From: | Rod Taylor <rbt(at)rbt(dot)ca> |
---|---|
To: | Brian O'Donoghue <bodonoghue(at)stockbyte(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org, kguest(at)stockbyte(dot)com |
Subject: | Re: 7.3.3 ADD COLUMN wierdness |
Date: | 2003-06-16 12:49:00 |
Message-ID: | 1055767740.91882.26.camel@jester |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Mon, 2003-06-16 at 07:53, Brian O'Donoghue wrote:
> I'm running two different strains of PostgreSQL
>
> 7.1.3, which is what our website is running off of now and 7.3.3, which we
> hope to move to (sometime).
>
> In 7.1.3 I can say
>
> ALTER TABLE blah ADD COLUMN whatever integer not null;
CREATE TABLE bob(col integer);
INSERT INTO bob VALUES (1);
ALTER TABLE bob ADD COLUMN col2 integer NOT NULL;
Now of course, the table has a NULL value for col2 which is not allowed
per the NOT NULL constraint.
Until we allow processing of a DEFAULT expression during column
creation, this will not work that way.
You could argue we should allow NOT NULL to be added to an empty table.
--
Rod Taylor <rbt(at)rbt(dot)ca>
PGP Key: http://www.rbt.ca/rbtpub.asc
From | Date | Subject | |
---|---|---|---|
Next Message | Brian O'Donoghue | 2003-06-16 13:43:41 | Re: 7.3.3 ADD COLUMN wierdness |
Previous Message | Brian O'Donoghue | 2003-06-16 11:53:11 | 7.3.3 ADD COLUMN wierdness |