diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-03-24 23:38:49 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-03-24 23:38:49 +0000 |
commit | 457ad3925de8bd1a2ae025a05d60862d2f98f611 (patch) | |
tree | 34781912d31ed7ec5970a8f27c06e822528affb1 | |
parent | 8899a2aba92c4a17f422172e7c9dd0e383eefa39 (diff) | |
download | postgresql-457ad3925de8bd1a2ae025a05d60862d2f98f611.tar.gz postgresql-457ad3925de8bd1a2ae025a05d60862d2f98f611.zip |
Add a more useful error message for the case where someone tries to pass
a whole row or record variable into a SQL function. Eventually this case
should be made to actually work, but for now this is better than what it
did before.
-rw-r--r-- | src/pl/plpgsql/src/gram.y | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/src/pl/plpgsql/src/gram.y b/src/pl/plpgsql/src/gram.y index b6526ce47bc..c116d5fb4da 100644 --- a/src/pl/plpgsql/src/gram.y +++ b/src/pl/plpgsql/src/gram.y @@ -4,7 +4,7 @@ * procedural language * * IDENTIFICATION - * $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.51 2004/02/25 18:10:51 tgl Exp $ + * $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.52 2004/03/24 23:38:49 tgl Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -1660,6 +1660,20 @@ read_sql_construct(int until, plpgsql_dstring_append(&ds, buf); break; + case T_ROW: + /* XXX make this work someday */ + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("passing a whole row variable into a SQL command is not implemented"))); + break; + + case T_RECORD: + /* XXX make this work someday */ + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("passing a whole record variable into a SQL command is not implemented"))); + break; + default: plpgsql_dstring_append(&ds, yytext); break; @@ -1867,6 +1881,20 @@ make_select_stmt(void) plpgsql_dstring_append(&ds, buf); break; + case T_ROW: + /* XXX make this work someday */ + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("passing a whole row variable into a SQL command is not implemented"))); + break; + + case T_RECORD: + /* XXX make this work someday */ + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("passing a whole record variable into a SQL command is not implemented"))); + break; + default: plpgsql_dstring_append(&ds, yytext); break; |