X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3D5993A3FC8 for ; Sun, 31 Oct 2004 01:22:56 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 22004-10 for ; Sun, 31 Oct 2004 00:22:44 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 5C6273A3FC7 for ; Sun, 31 Oct 2004 01:22:46 +0100 (BST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i9V0MhJ7025613 for ; Sun, 31 Oct 2004 00:22:43 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i9V00o1C022152 for pgsql-sql@postgresql.org; Sun, 31 Oct 2004 00:00:50 GMT From: Murphy Pope Subject: Re: ORDER BY and NULLs X-Newsgroups: comp.databases.postgresql.sql Reply-To: pope_murphy@hotmail.com Mail-Copies-To: pope_murphy@hotmail.com References: <011d01c49e5b$c88fdb20$2766f30a@development.greatgulfhomes.com> <414DB1AB.5080207@sympatico.ca> <414DB594.5000300@numerixtechnology.de> <19733.1095613137@sss.pgh.pa.us> <414DBF6D.8040500@numerixtechnology.de> <87zn3mjeaw.fsf@stark.xeocode.com> Lines: 50 User-Agent: KNode/0.7.7 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit Message-ID: X-Complaints-To: abuse@usenetserver.com X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly. Date: Sat, 30 Oct 2004 20:00:25 -0400 To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/211 X-Sequence-Number: 19314 > You should just cross out that whole section. It's just flatly wrong. > > I had always assumed it was just people bringing assumptions over from > Oracle where it is true. Perhaps this book is to blame for some of the > confusion. Which book is it? > > Postgres indexes NULLs. It can use them for ORDER BY clauses. I know this is an old-ish topic, but the question keeps coming up and I see different answers every time. I think I found the definitive answer and it looks like everyone (Bruce, Tom, the book) is half-right.  Maybe this should go in a FAQ or something since there seems to be so much confusion.