mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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.
This commit is contained in:
@ -4,7 +4,7 @@
|
|||||||
* procedural language
|
* procedural language
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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.
|
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||||
*
|
*
|
||||||
@ -1660,6 +1660,20 @@ read_sql_construct(int until,
|
|||||||
plpgsql_dstring_append(&ds, buf);
|
plpgsql_dstring_append(&ds, buf);
|
||||||
break;
|
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:
|
default:
|
||||||
plpgsql_dstring_append(&ds, yytext);
|
plpgsql_dstring_append(&ds, yytext);
|
||||||
break;
|
break;
|
||||||
@ -1867,6 +1881,20 @@ make_select_stmt(void)
|
|||||||
plpgsql_dstring_append(&ds, buf);
|
plpgsql_dstring_append(&ds, buf);
|
||||||
break;
|
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:
|
default:
|
||||||
plpgsql_dstring_append(&ds, yytext);
|
plpgsql_dstring_append(&ds, yytext);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user