Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit457ad39

Browse files
committed
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 caseshould be made to actually work, but for now this is better than what itdid before.
1 parent8899a2a commit457ad39

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

‎src/pl/plpgsql/src/gram.y

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* procedural language
55
*
66
* IDENTIFICATION
7-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.51 2004/02/25 18:10:51 tgl Exp $
7+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.52 2004/03/24 23:38:49 tgl Exp $
88
*
99
* This software is copyrighted by Jan Wieck - Hamburg.
1010
*
@@ -1660,6 +1660,20 @@ read_sql_construct(int until,
16601660
plpgsql_dstring_append(&ds, buf);
16611661
break;
16621662

1663+
case T_ROW:
1664+
/* XXX make this work someday*/
1665+
ereport(ERROR,
1666+
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
1667+
errmsg("passing a whole row variable into a SQL command is not implemented")));
1668+
break;
1669+
1670+
case T_RECORD:
1671+
/* XXX make this work someday*/
1672+
ereport(ERROR,
1673+
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
1674+
errmsg("passing a whole record variable into a SQL command is not implemented")));
1675+
break;
1676+
16631677
default:
16641678
plpgsql_dstring_append(&ds, yytext);
16651679
break;
@@ -1867,6 +1881,20 @@ make_select_stmt(void)
18671881
plpgsql_dstring_append(&ds, buf);
18681882
break;
18691883

1884+
case T_ROW:
1885+
/* XXX make this work someday*/
1886+
ereport(ERROR,
1887+
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
1888+
errmsg("passing a whole row variable into a SQL command is not implemented")));
1889+
break;
1890+
1891+
case T_RECORD:
1892+
/* XXX make this work someday*/
1893+
ereport(ERROR,
1894+
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
1895+
errmsg("passing a whole record variable into a SQL command is not implemented")));
1896+
break;
1897+
18701898
default:
18711899
plpgsql_dstring_append(&ds, yytext);
18721900
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp