Re: Catalog domain not-null constraints

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Catalog domain not-null constraints
Дата
Msg-id 99adc944-bcc1-41bb-ae59-a10fb345f5dc@eisentraut.org
обсуждение исходный текст
Ответ на Re: Catalog domain not-null constraints  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
On 23.11.23 17:38, Alvaro Herrera wrote:
> If you create a table with column of domain that has a NOT NULL
> constraint, what happens?  I mean, is the table column marked
> attnotnull, and how does it behave?

No, the domain does not affect the catalog entry for the column.  This 
is the same way it behaves now.

> Is there a separate pg_constraint
> row for the constraint in the table?  What happens if you do
> ALTER TABLE ... DROP NOT NULL for that column?

Those are separate.  After dropping the NOT NULL for a column, null 
values for the column could still be rejected by a domain.  (This is the 
same way CHECK constraints work.)




В списке pgsql-hackers по дате отправления:

Предыдущее
От: jian he
Дата:
Сообщение: Re: Improve rowcount estimate for UNNEST(column)
Следующее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Re: [PATCH] pg_convert improvement