Received: from smtpzilla1.xs4all.nl (smtpzilla1.xs4all.nl [194.109.127.137]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9SLcGP32245; Sun, 28 Oct 2001 16:38:16 -0500 (EST) (envelope-from rene@lab.applinet.nl) Received: from TAL (a194-109-250-148.adsl.xs4all.nl [194.109.250.148]) by smtpzilla1.xs4all.nl (8.12.0/8.12.0) with SMTP id f9SLcDhA056243; Sun, 28 Oct 2001 22:38:14 +0100 (CET) From: Rene Pijlman To: pgsql-patches@postgresql.org Cc: pgsql-docs@postgresql.org Subject: Re: NULLs and sort order Date: Sun, 28 Oct 2001 22:39:23 +0100 Organization: Applinet Message-ID: References: <7b0npts2v4csnqttdoviurtnsbvafape0v@4ax.com> In-Reply-To: <7b0npts2v4csnqttdoviurtnsbvafape0v@4ax.com> X-Mailer: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="--=_bouottk4192cdppvnqtr416jv6im8idck2.MFSBCHJLHS" X-Archive-Number: 200110/52 X-Sequence-Number: 1066 ----=_bouottk4192cdppvnqtr416jv6im8idck2.MFSBCHJLHS Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Attached is a small patch for the Reference Manual which adds information about nulls and sort order. This is based on information obtained from Peter Eisentraut and Tom Lane on pgsql-hackers. Please check my English and Docbook markup, as both are a second language to me. On Sun, 09 Sep 2001 16:58:18 +0200, I wrote: >I'm forwarding this information from Peter Eisentraut on >pgsql-hackers about NULLs and sort order. I couldn't find this >in the documentation.=20 > >I guess it should be in "ORDER BY Clause" of "SELECT" in the >Reference Manual, and in the 7.2 release notes. > >Can someone add this to the documentation? > >Or am I expected to submit a patch on the Docbook sources? > >On Sun, 9 Sep 2001 15:25:17 +0200 (CEST), Peter Eisentraut > wrote: >>Rene Pijlman writes: >>> Currently the JDBC driver says: >>> - Backend >=3D 7.2 sorts nulls higher than any other value in a >>> domain. In other words: ascending means nulls at the end, >>> descending means nulls at the start. >>> - Backend < 7.2 puts nulls at the end regardless of sort order. >> >>That is correct. >> >>--=20 >>Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter Regards, Ren=E9 Pijlman ----=_bouottk4192cdppvnqtr416jv6im8idck2.MFSBCHJLHS Content-Type: text/plain; charset=us-ascii; name=patch.diff Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=patch.diff Index: doc/src/sgml/ref/select.sgml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v retrieving revision 1.49 diff -c -r1.49 select.sgml *** doc/src/sgml/ref/select.sgml 2001/10/23 16:42:36 1.49 --- doc/src/sgml/ref/select.sgml 2001/10/28 21:37:26 *************** *** 601,606 **** --- 601,613 ---- specific ordering operator name may be specified. ASC is equivalent to USING < and DESC is equivalent to USING >. +=20 + + The null value sorts higher than any other value in a domain. In other + words, with ascending sort order nulls sort at the end and with + descending sort order nulls sort at the start. + +=20 =20=20=20=20 ----=_bouottk4192cdppvnqtr416jv6im8idck2.MFSBCHJLHS--