From: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
---|---|
To: | "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Robert Haas" <robertmhaas(at)gmail(dot)com> |
Cc: | "Pg Hackers" <pgsql-hackers(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: [COMMITTERS] pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction. |
Date: | 2011-01-26 19:01:33 |
Message-ID: | 4D401B2D0200002500039D4C@gw.wicourts.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> If you really want to do what you seem to want (i.e. add a column
> with a default and not have it alter existing rows), you can
> already do it like this:
>
> ALTER TABLE foo ADD COLUMN bar INTEGER, ALTER COLUMN bar SET
> DEFAULT 5;
>
> If there's an intention to improve ALTER TABLE so that it
> propagates the new default to existing tuples in other tables, I
> have no problem with it throwing an error now. Perhaps suggest
> the above syntax in a hint or something.
+1
I haven't reviewed the standard in this regard (always a painful
experience), but I believe Tom. The behavior suggested by Robert
would surprise *me*, at least.
-Kevin
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-01-26 20:16:07 | Re: [COMMITTERS] pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction. |
Previous Message | Alvaro Herrera | 2011-01-26 18:54:58 | Re: [COMMITTERS] pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction. |
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2011-01-26 19:08:35 | Re: SSI patch version 14 |
Previous Message | Alvaro Herrera | 2011-01-26 18:54:58 | Re: [COMMITTERS] pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction. |