postgresql/src/include
Tom Lane 9dbf2b7d75 Restructure SELECT INTO's parsetree representation into CreateTableAsStmt.
Making this operation look like a utility statement seems generally a good
idea, and particularly so in light of the desire to provide command
triggers for utility statements.  The original choice of representing it as
SELECT with an IntoClause appendage had metastasized into rather a lot of
places, unfortunately, so that this patch is a great deal more complicated
than one might at first expect.

In particular, keeping EXPLAIN working for SELECT INTO and CREATE TABLE AS
subcommands required restructuring some EXPLAIN-related APIs.  Add-on code
that calls ExplainOnePlan or ExplainOneUtility, or uses
ExplainOneQuery_hook, will need adjustment.

Also, the cases PREPARE ... SELECT INTO and CREATE RULE ... SELECT INTO,
which formerly were accepted though undocumented, are no longer accepted.
The PREPARE case can be replaced with use of CREATE TABLE AS EXECUTE.
The CREATE RULE case doesn't seem to have much real-world use (since the
rule would work only once before failing with "table already exists"),
so we'll not bother with that one.

Both SELECT INTO and CREATE TABLE AS still return a command tag of
"SELECT nnnn".  There was some discussion of returning "CREATE TABLE nnnn",
but for the moment backwards compatibility wins the day.

Andres Freund and Tom Lane
2012-03-19 21:38:12 -04:00
..
access Teach SPGiST to store nulls and do whole-index scans. 2012-03-11 16:29:59 -04:00
bootstrap Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
catalog Restructure SELECT INTO's parsetree representation into CreateTableAsStmt. 2012-03-19 21:38:12 -04:00
commands Restructure SELECT INTO's parsetree representation into CreateTableAsStmt. 2012-03-19 21:38:12 -04:00
datatype Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
executor Restructure SELECT INTO's parsetree representation into CreateTableAsStmt. 2012-03-19 21:38:12 -04:00
foreign Revise FDW planning API, again. 2012-03-09 12:49:25 -05:00
lib Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
libpq Remove arbitrary limitation on length of common name in SSL certificates. 2012-02-23 15:48:04 -05:00
mb Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
nodes Restructure SELECT INTO's parsetree representation into CreateTableAsStmt. 2012-03-19 21:38:12 -04:00
optimizer Revisit handling of UNION ALL subqueries with non-Var output columns. 2012-03-16 13:11:55 -04:00
parser Restructure SELECT INTO's parsetree representation into CreateTableAsStmt. 2012-03-19 21:38:12 -04:00
port Support for building with MS Visual Studio 2010. 2012-01-03 08:44:26 -05:00
portability Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
postmaster Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
regex Avoid repeated creation/freeing of per-subre DFAs during regex search. 2012-02-24 18:40:30 -05:00
replication Various minor comments changes from bgwriter to checkpointer. 2012-01-30 14:34:25 +00:00
rewrite Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
snowball Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
storage Add comments explaining why our Itanium spinlock implementation is safe. 2012-03-16 10:14:45 +02:00
tcop Restructure SELECT INTO's parsetree representation into CreateTableAsStmt. 2012-03-19 21:38:12 -04:00
tsearch Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
utils Add const qualifier to tzn returned by timestamp2tm() 2012-03-15 21:17:19 +02:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
c.h Add const qualifiers where they are accidentally cast away 2012-02-28 12:42:08 +02:00
fmgr.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
funcapi.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
getaddrinfo.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
getopt_long.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Makefile Fix server header file installation with vpath builds 2011-11-10 20:52:54 +02:00
miscadmin.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
pg_config.h.in Allow MinGW builds to use standardly-named OpenSSL libraries. 2012-02-23 15:05:08 -05:00
pg_config.h.win32 Allow MinGW builds to use standardly-named OpenSSL libraries. 2012-02-23 15:05:08 -05:00
pg_config_manual.h Use LWSYNC in place of SYNC/ISYNC in PPC spinlocks, where possible. 2012-01-02 00:02:02 -05:00
pg_trace.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
pgstat.h Add deadlock counter to pg_stat_database 2012-01-26 15:58:19 +01:00
pgtime.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
port.h Support fls(). 2012-02-07 13:45:46 -05:00
postgres.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
postgres_ext.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
postgres_fe.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
rusagestub.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
windowapi.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00