]> granicus.if.org Git - postgresql/commitdiff
Clean up parsing of CREATE TRIGGER's argument list.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 11 May 2011 18:43:01 +0000 (14:43 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 11 May 2011 18:43:01 +0000 (14:43 -0400)
Use ColLabel in place of ColId, so that reserved words are accepted as if
they were not reserved.  Also, remove BCONST and XCONST, which were never
documented as allowed.  Allowing those exposes to users an implementation
detail, namely the format in which the lexer outputs such constants, that
seems unwise to expose.

No documentation change needed, since this just makes the code act more
like you'd expect from reading the CREATE TRIGGER man page.

Per complaint from Szymon Guz and subsequent discussion.

src/backend/parser/gram.y

index dd959618419032acd3df1fa14644c9b2052dd462..1d39674de4cd7ad16df834ad4fe09acf6e042530 100644 (file)
@@ -4126,9 +4126,7 @@ TriggerFuncArg:
                                }
                        | FCONST                                                                { $$ = makeString($1); }
                        | Sconst                                                                { $$ = makeString($1); }
-                       | BCONST                                                                { $$ = makeString($1); }
-                       | XCONST                                                                { $$ = makeString($1); }
-                       | ColId                                                                 { $$ = makeString($1); }
+                       | ColLabel                                                              { $$ = makeString($1); }
                ;
 
 OptConstrFromTable: