pgsql: Allow ALTER TABLE name {OF type | NOT OF}.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow ALTER TABLE name {OF type | NOT OF}.
Date: 2011-04-21 02:01:43
Message-ID: E1QCjDD-0001U1-Lz@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Allow ALTER TABLE name {OF type | NOT OF}.

This syntax allows a standalone table to be made into a typed table,
or a typed table to be made standalone. This is possibly a mildly
useful feature in its own right, but the real motivation for this
change is that we need it to make pg_upgrade work with typed tables.
This doesn't actually fix that problem, but it's necessary
infrastructure.

Noah Misch

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/68739ba856c52e6721d6cffec21f1bf0327a9a7b

Modified Files
--------------
doc/src/sgml/ref/alter_table.sgml | 26 +++
src/backend/commands/tablecmds.c | 277 +++++++++++++++++++++++++++--
src/backend/parser/gram.y | 17 ++
src/backend/parser/parse_utilcmd.c | 22 +---
src/include/commands/tablecmds.h | 2 +
src/include/nodes/parsenodes.h | 2 +
src/test/regress/expected/alter_table.out | 38 ++++
src/test/regress/sql/alter_table.sql | 30 +++
8 files changed, 376 insertions(+), 38 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2011-04-21 02:05:22 pgsql: Typo fix.
Previous Message Tom Lane 2011-04-21 00:34:59 pgsql: Fix bugs in indexing of in-doubt HOT-updated tuples.

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-04-21 02:02:50 Re: pg_dump --binary-upgrade vs. ALTER TYPE ... DROP ATTRIBUTE
Previous Message Mike Pultz 2011-04-21 01:27:27 smallserial / serial2