pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction.
Date: 2011-01-26 11:37:19
Message-ID: E1Pi3gd-0001Cs-VO@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Remove arbitrary ALTER TABLE .. ADD COLUMN restriction.

The previous coding prevented ALTER TABLE .. ADD COLUMN from being used
with a non-NULL default in situations where the table's rowtype was being
used elsewhere. But this is a completely arbitrary restriction since
you could do the same operation in multiple steps (add the column, add
the default, update the table).

Inspired by a patch from Noah Misch, though I didn't use his code.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=a06e41deebdf74b8b5109329dc75b2e9d9057962

Modified Files
--------------
src/backend/commands/tablecmds.c | 8 +++++---
src/test/regress/expected/rowtypes.out | 9 ++++++---
src/test/regress/sql/rowtypes.sql | 8 ++++++--
3 files changed, 17 insertions(+), 8 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2011-01-26 11:43:37 pgsql: Add a comment explaining why we force physical removal of OIDs.
Previous Message Robert Haas 2011-01-26 11:31:55 Re: pgsql: Update warning about synchronous-commit durability, per suggesti

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-01-26 12:31:40 Re: ALTER TYPE 2: skip already-provable no-work rewrites
Previous Message Simon Riggs 2011-01-26 11:36:15 Re: SSI patch version 14