From: | Andrew Sullivan <andrew(at)libertyrms(dot)info> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Bug in 7.2.1? -- ERROR: Adding columns with defaults is not implemented. |
Date: | 2002-07-08 17:02:04 |
Message-ID: | 20020708130204.H15271@mail.libertyrms.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, Jul 06, 2002 at 05:33:29PM -0700, ad wolf wrote:
> Using pg 7.1.2, I can enter the following statement successfully:
>
> # alter table manufacturer add column dummy integer not null default
> 1;
Yes, it succeeds. But check the table after you're done: the "not
null" has not taken effect. In fact, it's not implemented, and it
just fails silently in the 7.1 series.
>
> However, under 7.2.1, the same statement gets me --
>
> ERROR: Adding columns with defaults is not implemented.
> Add the column, then use ALTER TABLE SET DEFAULT.
>
> My question is two-fold -- first, is this new behavior a feature, or a
> bug?
A feature to address the previous bug (silent failure of a legal SQL
statement).
> Second, what features/fixes would i lose by reverting to 7.1.2?
There were a number of bugfixes in 7.2. Also, the planner and
optimiser are much improved, and there is the nice new
statistics-gathering subsystem.
> I'd like to stick with 7.2.1, but this new behavior is making it
> difficult for me. I can't simply drop & recreate all my tables just
> to add a column!
You can add a constraint to get the NOT NULL feature.
A
--
----
Andrew Sullivan 87 Mowat Avenue
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M6K 3E3
+1 416 646 3304 x110
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2002-07-08 17:04:25 | Re: Bug in 7.2.1? -- ERROR: Adding columns with defaults |
Previous Message | Francisco Reyes | 2002-07-08 17:01:11 | Re: CRC function? |