From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [COMMITTERS] pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction. |
Date: | 2011-01-26 15:36:01 |
Message-ID: | 16000.1296056161@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Robert Haas <rhaas(at)postgresql(dot)org> writes:
> 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).
This is not an "arbitrary restriction" because according to the SQL
standard those operations mean different things. In the first case you
get a column filled with the default value, in the second case you get a
column filled with nulls. And the latter case is the only one that
works properly with a rowtype.
Kindly revert this patch.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-01-26 15:46:57 | Re: [COMMITTERS] pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction. |
Previous Message | Bruce Momjian | 2011-01-26 14:25:54 | pgsql: Update contrib documention mentions to point to actual documenta |
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2011-01-26 15:38:01 | Re: [HACKERS] Seeking Mentors for Funded Reviewers |
Previous Message | Tom Lane | 2011-01-26 15:31:34 | Re: Extensions support for pg_dump, patch v27 |