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

Commit84dbd5a

Browse files
committed
Disallow SETOF in the input of parseTypeString(). Formerly it was
silently ignored, allowing one to write bizarre things likeDECLARE x setof int;in plpgsql. This has misled at least one novice into thinking thatplpgsql variables could be sets ...
1 parentc3d6c7d commit84dbd5a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/backend/parser/parse_type.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/parser/parse_type.c,v 1.71 2004/08/29 05:06:44 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/parser/parse_type.c,v 1.72 2004/12/15 20:15:17 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -453,6 +453,8 @@ parseTypeString(const char *str, Oid *type_id, int32 *typmod)
453453
if (typename==NULL||
454454
!IsA(typename,TypeName))
455455
gotofail;
456+
if (typename->setof)
457+
gotofail;
456458

457459
*type_id=typenameTypeId(typename);
458460
*typmod=typename->typmod;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp