Re: cataloguing NOT NULL constraints

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Nikhil Sontakke <nikkhils(at)gmail(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(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-04 14:14:43
Message-ID: 1312467070-sup-2158@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from Nikhil Sontakke's message of jue ago 04 04:23:59 -0400 2011:

> Some nit-picking.
>
> AFAICS above, we seem to be only using 'tbinfo' to identify the object
> type here - 'table' visavis 'domain'. We could probably reduce the
> above two elses to a single one and use the check of tbinfo being not
> null to decide which object type name to spit out..

Yeah, I considered that, but I rejected the idea on the grounds that all
the preceding blocks use this style. (Also, if I understand you well,
what you suggest would incur into a translatability problem; we'd have
to create two separate messages for that purpose anyway.)

> Although, it's difficult to see how we could end up marking NOT NULL
> constraints as 'separate' ever. So this code will be rarely exercised,
> if ever IMO.

Well, as Dean points out, as soon as we have NOT VALID constraints it
will be necessary. I prefer to leave that out for a later patch.

Thanks for looking.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-08-04 14:25:49 Re: plperl crash with Debian 6 (64 bit), pl/perlu, libwww and https
Previous Message James Robinson 2011-08-04 14:10:02 Re: Postgres / plpgsql equivalent to python's getattr() ?