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

From: Don Baccus <dhogaza(at)pacifier(dot)com>
To: "Ross J(dot) Reedstrom" <reedstrm(at)wallace(dot)ece(dot)rice(dot)edu>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Happy column adding (was RE: [HACKERS] Happy column dropping)
Date: 2000-01-25 19:20:01
Message-ID: 3.0.1.32.20000125112001.0106bec0@mail.pacifier.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)pacifier(dot)com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 2000-01-25 19:30:01 Re: Happy column adding (was RE: [HACKERS] Happy column dropping)
Previous Message Don Baccus 2000-01-25 19:05:43 Re: Happy column adding (was RE: [HACKERS] Happy column dropping)