Re: cataloguing NOT NULL constraints
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Kevin Grittner <kevin.grittner@wicourts.gov>
Cc: Alvaro Herrera <alvherre@commandprompt.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-08-16T14:35:45Z
Lists: pgsql-hackers
Excerpts from Kevin Grittner's message of jue ago 02 10:48:02 -0400 2012: > > "Kevin Grittner" <Kevin.Grittner@wicourts.gov> wrote: > > > Don't forget the peculiarities of columns with record types. > > I forgot to include the type creation in the example: > > test=# create type a as (a1 int, a2 int); > CREATE TYPE Thanks for the example. After playing with this, I think that a NOT NULL constraint attached to a column with a composite type is equivalent to a CHECK (col IS DISTINCT FROM NULL); at least they seem to behave identically. Is that what you would expect? This seems a bit complicated to handle with the way I'm doing things today; at parse analysis time, when my current code is creating the check constraint, we don't know anything about the type of the column IIRC. Maybe I will have to delay creating the constraint until execution. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Catalog NOT NULL constraints
- e056c557aef4 16.0 landed