Re: [COMMITTERS] pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction.
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: [COMMITTERS] pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction. |
| Дата | |
| Msg-id | 16000.1296056161@sss.pgh.pa.us обсуждение исходный текст |
| Ответы |
Re: [COMMITTERS] pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction.
|
| Список | pgsql-hackers |
Robert Haas <rhaas@postgresql.org> writes:
> Remove arbitrary ALTER TABLE .. ADD COLUMN restriction.
> The previous coding prevented ALTER TABLE .. ADD COLUMN from being used
> with a non-NULL default in situations where the table's rowtype was being
> used elsewhere. But this is a completely arbitrary restriction since
> you could do the same operation in multiple steps (add the column, add
> the default, update the table).
This is not an "arbitrary restriction" because according to the SQL
standard those operations mean different things. In the first case you
get a column filled with the default value, in the second case you get a
column filled with nulls. And the latter case is the only one that
works properly with a rowtype.
Kindly revert this patch.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера