Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id B9B2CB5DBF6 for ; Fri, 22 Jul 2011 17:08:58 -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 75746-01 for ; Fri, 22 Jul 2011 20:08:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by mail.postgresql.org (Postfix) with SMTP id C753CB5DBF2 for ; Fri, 22 Jul 2011 17:08:51 -0300 (ADT) Received: (qmail invoked by alias); 22 Jul 2011 20:08:49 -0000 Received: from a88-115-218-165.elisa-laajakaista.fi (EHLO [10.0.0.102]) [88.115.218.165] by mail.gmx.net (mp062) with SMTP; 22 Jul 2011 22:08:49 +0200 X-Authenticated: #495269 X-Provags-ID: V01U2FsdGVkX1/g13YopO/gA/sVR7Cq/uEoBHCK8p7pnuw36lsUkm ZyWto8ERh0m2Np Subject: Re: cataloguing NOT NULL constraints From: Peter Eisentraut To: Alvaro Herrera Cc: Pg Hackers In-Reply-To: <1311172567-sup-1219@alvh.no-ip.org> References: <20110707213401.GA27098@alvh.no-ip.org> <1310237123.9823.1.camel@vanquo.pezone.net> <1311172567-sup-1219@alvh.no-ip.org> Content-Type: text/plain; charset="UTF-8" Date: Fri, 22 Jul 2011 23:08:48 +0300 Message-ID: <1311365328.7322.1.camel@vanquo.pezone.net> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-3.088 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-1.189 X-Spam-Level: X-Archive-Number: 201107/1241 X-Sequence-Number: 192340 On ons, 2011-07-20 at 13:53 -0400, Alvaro Herrera wrote: > I checked the check_constraints definition in the standard and it's > not clear to me that NOT NULL constraints are supposed to be there at > all. Are NOT NULL constraints considered to be CHECK constraints too? Yes, NOT NULL is considered just a notational shorthand for CHECK (x IS NULL).