Re: cataloguing NOT NULL constraints

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: cataloguing NOT NULL constraints
Date: 2011-08-07 09:43:52
Message-ID: 1312710232.24721.19.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On lör, 2011-08-06 at 12:58 +0100, Dean Rasheed wrote:
> Right now \d gives:
>
> Table "public.foo"
> Column | Type | Modifiers
> --------+---------+-----------
> a | integer | not null
> b | integer |
> c | integer |
> Check constraints:
> "foo_b_check" CHECK (b IS NOT NULL)
> "foo_c_check" CHECK (NOT c IS NULL)
>
> With this approach, one change would be that you'd gain an extra "not
> null" in the Modifiers column for "b".
>
> But how many CHECK constraints would show? I guess it would show 3,
> although it could be changed to just show 1. But it certainly couldn't
> continue to show 2, since nothing in the catalogs could distinguish
> the constraints on "a" from those on "b".

I'd say we would show all (what is currently known as) NOT NULL
constraints under "Check constraints:".

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-08-07 11:24:10 Re: Transient plans versus the SPI API
Previous Message Hannu Krosing 2011-08-07 09:25:12 Re: Transient plans versus the SPI API