Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results
Date
Msg-id 640.1006920408@sss.pgh.pa.us
Whole thread Raw
In response to Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I am trying to find a way to get this information to users.  I have
> modified command.c to output a different error message:

> test=> alter table x add column z int default 4;
> ERROR:  Adding columns with defaults is not implemented because it
>         is unclear whether existing rows should have the DEFAULT value
>         or NULL.  Add the column, then use ALTER TABLE SET DEFAULT.
>         You may then use UPDATE to give a non-NULL value to existing rows.

Kindly put the error message back as it was.

It's not "unclear" what the command should do; SQL92 is perfectly
clear about it.

I would also remind you that we've got quite a few sets of error message
translations in place now.  Gratuitous changes to message wording in the
last week of beta are *not* appropriate, because they break all the
translations.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: 7.2beta3 on Digital Alpha
Next
From: Tom Lane
Date:
Subject: Re: Possible bug in new VACUUM code