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

Commit6851bae

Browse files
committed
Allow %TYPE to be used with SETOF, per gripe from Murat Tasan.
1 parent8a1468a commit6851bae

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎src/backend/parser/gram.y

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.524 2006/01/22 20:03:16 tgl Exp $
14+
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.525 2006/01/31 22:40:03 tgl Exp $
1515
*
1616
* HISTORY
1717
* AUTHORDATEMAJOR EVENT
@@ -3672,7 +3672,7 @@ func_return:
36723672
;
36733673

36743674
/*
3675-
* We would like to make thesecond production here be ColId attrs etc,
3675+
* We would like to make the%TYPE productions here be ColId attrs etc,
36763676
* but that causes reduce/reduce conflicts. type_name is next best choice.
36773677
*/
36783678
func_type:Typename{$$ =$1; }
@@ -3683,6 +3683,14 @@ func_type:Typename{ $$ = $1; }
36833683
$$->pct_type =true;
36843684
$$->typmod = -1;
36853685
}
3686+
| SETOF type_name attrs'%' TYPE_P
3687+
{
3688+
$$ = makeNode(TypeName);
3689+
$$->names = lcons(makeString($2),$3);
3690+
$$->pct_type =true;
3691+
$$->typmod = -1;
3692+
$$->setof =TRUE;
3693+
}
36863694
;
36873695

36883696

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp