Re: cataloguing NOT NULL constraints

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: cataloguing NOT NULL constraints
Дата
Msg-id 992af0a9-86ee-ecd0-2e12-ed66a1b100dd@eisentraut.org
обсуждение исходный текст
Ответ на Re: cataloguing NOT NULL constraints  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
On 24.07.23 12:32, Alvaro Herrera wrote:
> However, 11.16 (<drop column not null clause> as part of 11.12 <alter
> column definition>), says that DROP NOT NULL causes the indication of
> the column as NOT NULL to be removed.  This, to me, says that if you do
> have multiple such constraints, you'd better remove them all with that
> command.  All in all, I lean towards allowing just one as best as we
> can.

Another clue is in 11.15 <set column not null clause>, which says

     1) Let C be the column identified by the <column name> CN in the
     containing <alter column definition>. If the column descriptor of C
     does not contain an indication that C is defined as NOT NULL, then:

     [do things]

Otherwise it does nothing.  So there can only be one such constraint per 
table.




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

Предыдущее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: [PoC] pg_upgrade: allow to upgrade publisher node
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: add timing information to pg_upgrade