Re: cataloguing NOT NULL constraints - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: cataloguing NOT NULL constraints
Date
Msg-id 1312710232.24721.19.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: cataloguing NOT NULL constraints  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List 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:".




pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Transient plans versus the SPI API
Next
From: Simon Riggs
Date:
Subject: Re: Transient plans versus the SPI API