X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4EC10476291 for ; Tue, 4 Mar 2003 15:06:57 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 97982-02 for ; Tue, 4 Mar 2003 15:06:55 -0500 (EST) Received: from xeon.unixathome.org (bast.unixathome.org [66.11.174.150]) by postgresql.org (Postfix) with ESMTP id 978CC4762B6 for ; Tue, 4 Mar 2003 15:06:55 -0500 (EST) Received: by xeon.unixathome.org (Postfix, from userid 1000) id 574553F4A; Tue, 4 Mar 2003 15:07:29 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by xeon.unixathome.org (Postfix) with ESMTP id 4BED63F49; Tue, 4 Mar 2003 15:07:29 -0500 (EST) Date: Tue, 4 Mar 2003 15:07:29 -0500 (EST) From: Dan Langille X-X-Sender: dan@xeon.unixathome.org To: Ian Burrell Cc: pgsql-sql@postgresql.org Subject: Re: Sorting by NULL values In-Reply-To: <3E65023E.10404@onsitetech.com> Message-ID: <20030304150627.H38754@xeon.unixathome.org> References: <3E65023E.10404@onsitetech.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new X-Archive-Number: 200303/133 X-Sequence-Number: 12173 On Tue, 4 Mar 2003, Ian Burrell wrote: > Is there any standard on how sorting NULLs work? Is there a way to > change Postgres's behavior? Is there a way to replace the NULLs with > empty strings? I think what you want may be either COALESCE or ISNULL/IFNULL or perhaps a CASE statement.