diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-07-18 23:20:33 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-07-18 23:20:33 +0000 |
commit | 216311d590de4638997eb391722f915026a29e88 (patch) | |
tree | 37aece19ef2bacb4f7d19818dbd1828ab15c19ec /src/backend/parser/parse_expr.c | |
parent | 44f665bf40322c84c6e1ac59d23926cae1150433 (diff) | |
download | postgresql-216311d590de4638997eb391722f915026a29e88.tar.gz postgresql-216311d590de4638997eb391722f915026a29e88.zip |
First bits of work on error message editing.
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r-- | src/backend/parser/parse_expr.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 4519c7ffb58..fbfa204694e 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.155 2003/07/03 16:34:16 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.156 2003/07/18 23:20:32 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -128,13 +128,16 @@ transformExpr(ParseState *pstate, Node *expr) /* Check parameter number is in range */ if (paramno <= 0) /* probably can't happen? */ - elog(ERROR, "Parameter '$%d' is out of range", - paramno); + ereport(ERROR, + (errcode(ERRCODE_UNDEFINED_PARAMETER), + errmsg("there is no parameter $%d", paramno))); if (paramno > toppstate->p_numparams) { if (!toppstate->p_variableparams) - elog(ERROR, "Parameter '$%d' is out of range", - paramno); + ereport(ERROR, + (errcode(ERRCODE_UNDEFINED_PARAMETER), + errmsg("there is no parameter $%d", + paramno))); /* Okay to enlarge param array */ if (toppstate->p_paramtypes) toppstate->p_paramtypes = |