diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2001-08-09 18:28:18 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2001-08-09 18:28:18 +0000 |
commit | 2e57875b97e8bf08e44352045197995d5d589a23 (patch) | |
tree | b79404ffee7e20f1d4ad1fbfdbdbd5c0d6fbeac9 /src/backend/parser/parse_clause.c | |
parent | 51e8dfddf10d5fd26a623c02700346c8bbf56b4c (diff) | |
download | postgresql-2e57875b97e8bf08e44352045197995d5d589a23.tar.gz postgresql-2e57875b97e8bf08e44352045197995d5d589a23.zip |
Use format_type sibling in backend error messages, so the user sees
consistent type naming.
Diffstat (limited to 'src/backend/parser/parse_clause.c')
-rw-r--r-- | src/backend/parser/parse_clause.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index 585b21b0f45..e8ba26295e7 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.81 2001/06/19 22:39:11 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.82 2001/08/09 18:28:17 petere Exp $ * *------------------------------------------------------------------------- */ @@ -29,6 +29,7 @@ #include "parser/parse_relation.h" #include "parser/parse_target.h" #include "parser/parse_type.h" +#include "utils/builtins.h" #include "utils/guc.h" @@ -292,8 +293,8 @@ transformJoinUsingClause(ParseState *pstate, List *leftVars, List *rightVars) * "=" operator that doesn't return bool is wrong anyway. */ if (exprType(result) != BOOLOID) - elog(ERROR, "JOIN/USING clause must return type bool, not type %s", - typeidTypeName(exprType(result))); + elog(ERROR, "JOIN/USING clause must return type boolean, not type %s", + format_type_be(exprType(result))); return result; } /* transformJoinUsingClause() */ @@ -328,8 +329,8 @@ transformJoinOnClause(ParseState *pstate, JoinExpr *j, result = transformExpr(pstate, j->quals, EXPR_COLUMN_FIRST); if (! coerce_to_boolean(pstate, &result)) - elog(ERROR, "JOIN/ON clause must return type bool, not type %s", - typeidTypeName(exprType(result))); + elog(ERROR, "JOIN/ON clause must return type boolean, not type %s", + format_type_be(exprType(result))); pstate->p_namespace = save_namespace; @@ -775,8 +776,8 @@ transformWhereClause(ParseState *pstate, Node *clause) qual = transformExpr(pstate, clause, EXPR_COLUMN_FIRST); if (! coerce_to_boolean(pstate, &qual)) - elog(ERROR, "WHERE clause must return type bool, not type %s", - typeidTypeName(exprType(qual))); + elog(ERROR, "WHERE clause must return type boolean, not type %s", + format_type_be(exprType(qual))); return qual; } |