]> granicus.if.org Git - postgresql/commit
Fix UtilityContainsQuery() to handle CREATE TABLE AS EXECUTE correctly.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 19 Oct 2012 22:33:45 +0000 (18:33 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 19 Oct 2012 22:33:45 +0000 (18:33 -0400)
commit5d1abe64e62f2bb3c1a8a4181974f0b17b8bc21d
tree8e9759c78820bae849acf4ec74903ab6d27e1157
parent4e32f8cd14fa6c66400e8af188bea78b22cf5f56
Fix UtilityContainsQuery() to handle CREATE TABLE AS EXECUTE correctly.

The code seems to have been written to handle the pre-parse-analysis
representation, where an ExecuteStmt would appear directly under
CreateTableAsStmt.  But in reality the function is only run on
already-parse-analyzed statements, so there will be a Query node in
between.  We'd not noticed the bug because the function is generally
not used at all except in extended query protocol.

Per report from Robert Haas and Rushabh Lathia.
src/backend/tcop/utility.c