File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/parser/parse_target.c,v 1.126 2004/09/30 00:24:21 tgl Exp $
11
+ * $PostgreSQL: pgsql/src/backend/parser/parse_target.c,v 1.127 2004/10/25 03:08:29 tgl Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -486,15 +486,17 @@ transformAssignmentIndirection(ParseState *pstate,
486
486
if (!typrelid )
487
487
ereport (ERROR ,
488
488
(errcode (ERRCODE_DATATYPE_MISMATCH ),
489
- errmsg ("cannot assign to a column of type %s because it is not a composite type" ,
489
+ errmsg ("cannot assign to field \"%s\" of column \"%s\" because its type %s is not a composite type" ,
490
+ strVal (n ), targetName ,
490
491
format_type_be (targetTypeId ))));
491
492
492
493
attnum = get_attnum (typrelid , strVal (n ));
493
494
if (attnum == InvalidAttrNumber )
494
495
ereport (ERROR ,
495
496
(errcode (ERRCODE_UNDEFINED_COLUMN ),
496
- errmsg ("column \"%s\" not found in data type %s" ,
497
- strVal (n ), format_type_be (targetTypeId ))));
497
+ errmsg ("cannot assign to field \"%s\" of column \"%s\" because there is no such column in data type %s" ,
498
+ strVal (n ), targetName ,
499
+ format_type_be (targetTypeId ))));
498
500
if (attnum < 0 )
499
501
ereport (ERROR ,
500
502
(errcode (ERRCODE_UNDEFINED_COLUMN ),
You can’t perform that action at this time.
0 commit comments