Alvaro Herrera <alvherre@commandprompt.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