mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Use format_type sibling in backend error messages, so the user sees
consistent type naming.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.69 2001/06/24 02:41:21 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.70 2001/08/09 18:28:18 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -22,6 +22,7 @@
|
||||
#include "parser/parse_relation.h"
|
||||
#include "parser/parse_target.h"
|
||||
#include "parser/parse_type.h"
|
||||
#include "utils/builtins.h"
|
||||
|
||||
|
||||
static List *ExpandAllTables(ParseState *pstate);
|
||||
@ -265,12 +266,12 @@ updateTargetListEntry(ParseState *pstate,
|
||||
tle->expr = CoerceTargetExpr(pstate, tle->expr, type_id,
|
||||
attrtype, attrtypmod);
|
||||
if (tle->expr == NULL)
|
||||
elog(ERROR, "Attribute '%s' is of type '%s'"
|
||||
elog(ERROR, "column \"%s\" is of type '%s'"
|
||||
" but expression is of type '%s'"
|
||||
"\n\tYou will need to rewrite or cast the expression",
|
||||
colname,
|
||||
typeidTypeName(attrtype),
|
||||
typeidTypeName(type_id));
|
||||
format_type_be(attrtype),
|
||||
format_type_be(type_id));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user