1
0
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:
Peter Eisentraut
2001-08-09 18:28:18 +00:00
parent 51e8dfddf1
commit 2e57875b97
16 changed files with 149 additions and 106 deletions

View File

@ -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));
}
/*