Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XRt3T-0002Qt-R1 for pgsql-docs@arkaria.postgresql.org; Thu, 11 Sep 2014 01:20:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XRt3S-0000kc-T0 for pgsql-docs@arkaria.postgresql.org; Thu, 11 Sep 2014 01:20:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XRt3Q-0000k3-Vl for pgsql-docs@postgresql.org; Thu, 11 Sep 2014 01:20:09 +0000 Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XRt3L-0006Sh-LH for pgsql-docs@postgresql.org; Thu, 11 Sep 2014 01:20:07 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1XRt3I-00005c-B1 for pgsql-docs@postgresql.org; Wed, 10 Sep 2014 18:20:00 -0700 Date: Wed, 10 Sep 2014 18:20:00 -0700 (PDT) From: David G Johnston To: pgsql-docs@postgresql.org Message-ID: <1410398400332-5818543.post@n5.nabble.com> In-Reply-To: References: Subject: Re: NULL as a (pseudo-)value not described? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org johnlumby wrote > As far as I can tell,=C2=A0=C2=A0=20 > the un-value NULL is not described anywhere in the doc > as being something that can be assigned to a column. >=20 > E.g. : > =C2=A0=C2=A0 .=C2=A0 not listed as a constant=C2=A0 (well that's reasonab= le as it isn't) > =C2=A0=C2=A0=C2=A0 .=C2=A0 not listed as an expression=C2=A0 (is NULL an = expression?) > =C2=A0=C2=A0=C2=A0 .=C2=A0 not explicitly listed under the INSERT and UPD= ATE commands > =C2=A0 =C2=A0 =C2=A0 =C2=A0 as a valid syntactic unit as an alternative t= o an expression > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (If it is not an expression) >=20 > I do see it listed as a valid keyword but there is no description there. >=20 > To put it another way,=C2=A0=C2=A0 the following syntax is apparently not= permitted > : > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 UPDATE my_nullable_table SET nullable_col = =3D NULL; >=20 > (I am not referring to other null-related constructs such as IS NULL,=C2= =A0 > IFNULL etc) >=20 > I have to assume I'm missing something? > Or is it that NULL is so,=C2=A0 well,=C2=A0 null,=C2=A0=C2=A0 that it can= not be described? http://www.postgresql.org/docs/9.4/static/ddl-default.html To your point: null is a constant/literal as defined in=20 http://www.postgresql.org/docs/9.4/static/sql-expressions.html#SYNTAX-EXPRE= SS-EVAL and so can appear in the defined expression area and so your example is explicitly allowed. http://www.postgresql.org/docs/9.4/static/bookindex.html#AEN167062 (under "N") Pseudo-type has a specific meaning is PostgreSQL which null does not conform to. Having brought this to attention why did you go looking for it and where, in order, did you look? I'll agree that it seems that a previous recognition that null can always used as a valid data value is assumed much like it is assumed that 1000 is a valid value for an integer. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/NULL-= as-a-pseudo-value-not-described-tp5818521p5818543.html Sent from the PostgreSQL - docs mailing list archive at Nabble.com. --=20 Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs