postgresql/src/backend/tcop
Robert Haas 68ef051f5c Refactor broken CREATE TABLE IF NOT EXISTS support.
Per bug #5988, reported by Marko Tiikkaja, and further analyzed by Tom
Lane, the previous coding was broken in several respects: even if the
target table already existed, a subsequent CREATE TABLE IF NOT EXISTS
might try to add additional constraints or sequences-for-serial
specified in the new CREATE TABLE statement.

In passing, this also fixes a minor information leak: it's no longer
possible to figure out whether a schema to which you don't have CREATE
access contains a sequence named like "x_y_seq" by attempting to create a
table in that schema called "x" with a serial column called "y".

Some more refactoring of this code in the future might be warranted,
but that will need to wait for a later major release.
2011-04-25 16:55:11 -04:00
..
Makefile Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
dest.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
fastpath.c Pass collations to functions in FunctionCallInfoData, not FmgrInfo. 2011-04-12 19:19:24 -04:00
postgres.c Add postmaster/postgres undocumented -b option for binary upgrades. 2011-04-25 12:00:21 -04:00
pquery.c pgindent run before PG 9.1 beta 1. 2011-04-10 11:42:00 -04:00
utility.c Refactor broken CREATE TABLE IF NOT EXISTS support. 2011-04-25 16:55:11 -04:00