Re: cataloguing NOT NULL constraints

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: cataloguing NOT NULL constraints
Дата
Msg-id CA+Tgmobnoxt83y1QesBNVArhFm-fLwWkDUyiV84e+psayDwB7A@mail.gmail.com
обсуждение исходный текст
Ответ на cataloguing NOT NULL constraints  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: cataloguing NOT NULL constraints  (Isaac Morland <isaac.morland@gmail.com>)
Re: cataloguing NOT NULL constraints  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Re: cataloguing NOT NULL constraints  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
On Wed, Aug 17, 2022 at 2:12 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> If you say CREATE TABLE (a int NOT NULL), you'll get a CHECK constraint
> printed by psql: (this is a bit more noisy that previously and it
> changes a lot of regression tests output).
>
> 55489 16devel 1776237=# create table tab (a int not null);
> CREATE TABLE
> 55489 16devel 1776237=# \d tab
>                     Tabla «public.tab»
>  Columna │  Tipo   │ Ordenamiento │ Nulable  │ Por omisión
> ─────────┼─────────┼──────────────┼──────────┼─────────────
>  a       │ integer │              │ not null │
> Restricciones CHECK:
>     "tab_a_not_null" CHECK (a IS NOT NULL)

In a table with many columns, most of which are NOT NULL, this is
going to produce a ton of clutter. I don't like that.

I'm not sure what a good alternative would be, though.

-- 
Robert Haas
EDB: http://www.enterprisedb.com

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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: pgstat: stats added in ReadPageInternal() aren't getting reported via pg_stat_wal
Следующее
От: Isaac Morland
Дата:
Сообщение: Re: cataloguing NOT NULL constraints