From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: cataloguing NOT NULL constraints |
Date: | 2022-09-20 10:51:09 |
Message-ID: | 20220920105109.kopdp7wmlkfi5ci5@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2022-Sep-19, Robert Haas wrote:
> On Wed, Aug 17, 2022 at 2:12 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> > 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.
Perhaps that can be solved by displaying the constraint name in the
table:
55489 16devel 1776237=# \d tab
Tabla «public.tab»
Columna │ Tipo │ Ordenamiento │ Nulable │ Por omisión
─────────┼─────────┼──────────────┼────────────────┼─────────────
a │ integer │ │ tab_a_not_null │
(Perhaps we can change the column title also, not sure.)
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"The Gord often wonders why people threaten never to come back after they've
been told never to return" (www.actsofgord.com)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2022-09-20 10:53:02 | Re: cataloguing NOT NULL constraints |
Previous Message | Michael Paquier | 2022-09-20 10:29:44 | Re: pg_create_logical_replication_slot argument incongruency |