]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Put analyze_keyword back in explain_option_name production.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 5 Jun 2013 17:32:53 +0000 (13:32 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 5 Jun 2013 17:33:33 +0000 (13:33 -0400)
In commit 2c92edad48796119c83d7dbe6c33425d1924626d, I broke "EXPLAIN
(ANALYZE)" syntax, because I mistakenly thought that ANALYZE/ANALYSE were
only partially reserved and thus would be included in NonReservedWord;
but actually they're fully reserved so they still need to be called out
here.

A nicer solution would be to demote these words to type_func_name_keyword
status (they can't be less than that because of "VACUUM [ANALYZE] ColId").
While that works fine so far as the core grammar is concerned, it breaks
ECPG's grammar for reasons I don't have time to isolate at the moment.
So do this for the time being.

Per report from Kevin Grittner.  Back-patch to 9.0, like the previous
commit.

src/backend/parser/gram.y

index a8ff1d1ce465bcadc2b69ab5a5961e7a8daa335f..3df7c04644525d4ddc5e6cfa3c0c4c73db8660d8 100644 (file)
@@ -6980,6 +6980,7 @@ explain_option_elem:
 
 explain_option_name:
                        NonReservedWord                 { $$ = $1; }
+                       | analyze_keyword               { $$ = "analyze"; }
                ;
 
 explain_option_arg: