Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results
Дата
Msg-id 640.1006920408@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: 7.2beta3 on Digital Alpha
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Possible bug in new VACUUM code