Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 78F35B5D944 for ; Thu, 4 Aug 2011 11:14:55 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 66148-04 for ; Thu, 4 Aug 2011 14:14:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id 859D3B5DBEC for ; Thu, 4 Aug 2011 11:14:49 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 1FE9E348049; Thu, 4 Aug 2011 07:14:49 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EZpZ1sp+wcWk; Thu, 4 Aug 2011 07:14:47 -0700 (PDT) Received: from perhan.alvh.no-ip.org (unknown [200.126.81.180]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id E2312348048; Thu, 4 Aug 2011 07:14:46 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id C46D96E7F5; Thu, 4 Aug 2011 10:14:43 -0400 (CLT) Content-Type: text/plain; charset=UTF-8 Cc: Dean Rasheed , Robert Haas , Pg Hackers Subject: Re: cataloguing NOT NULL constraints From: Alvaro Herrera To: Nikhil Sontakke In-reply-to: References: <20110707213401.GA27098@alvh.no-ip.org> <1311291819-sup-6206@alvh.no-ip.org> <1311367030-sup-9426@alvh.no-ip.org> <1312406314-sup-3089@alvh.no-ip.org> Date: Thu, 04 Aug 2011 10:14:43 -0400 Message-Id: <1312467070-sup-2158@alvh.no-ip.org> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201108/200 X-Sequence-Number: 192955 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 The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support