Re: Happy column adding (was RE: [HACKERS] Happy column dropping)

Don Baccus <dhogaza@pacifier.com>

From: Don Baccus <dhogaza@pacifier.com>
To: "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>, PostgreSQL Development <pgsql-hackers@postgresql.org>
Date: 2000-01-25T19:20:01Z
Lists: pgsql-hackers
At 12:29 PM 1/25/00 -0600, Ross J. Reedstrom wrote:
>On Tue, Jan 25, 2000 at 12:23:15PM -0500, Tom Lane wrote:

>> Well, yeah: wouldn't you expect that "ADD COLUMN x DEFAULT 42" would
>> cause every row currently existing in the table to acquire x = 42,
>> rather than x = NULL?  In fact that would *have* to happen to allow
>> constraints to be added; consider ADD COLUMN x DEFAULT 42 NOT NULL.

>Actually, no I wouldn't expect it. That's mixing DDL and DML in one
>statement.  I expect the ALTER command to be pure DDL, and the UPDATE
>to be pure DML.

Hmmm...interesting...is alter table in the standard?  Again, my copy
of Date's SQL 92 primer is somewhere 'wteen Boston, MA and Portland, OR,
so I can't look myself.   Since you've got the standard available you
can answer perhaps?

>Ouch, reading standards always makes my brain hurt. Especially how you
>have to read them upside down. Turns out SELECT INTO is in the standard,
>but not the way we implement it.

Scary!!! :) :)



- Don Baccus, Portland OR <dhogaza@pacifier.com>
  Nature photos, on-line guides, Pacific Northwest
  Rare Bird Alert Service and other goodies at
  http://donb.photo.net.