Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?

From: Jorge Godoy <jgodoy(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?
Date: 2007-11-08 09:46:36
Message-ID: 200711080746.37203.jgodoy@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Em Wednesday 07 November 2007 13:54:32 rihad escreveu:
>
> May I, as an outsider, comment? :) I really think of ASC NULLS FIRST
> (and DESC NULLS LAST) as the way to go. Imagine a last_login column that
> sorts users that have not logged in as the most recently logged in,
> which is not very intuitive. I vote for sort_nulls_first defaulting to
> false in order not to break bc.

But then, when ordering by login date, you should use COALESCE and infinity
for them
(http://www.postgresql.org/docs/8.2/interactive/datatype-datetime.html)

--
Jorge Godoy <jgodoy(at)gmail(dot)com>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2007-11-08 11:04:13 "Resurrected" data files - problem?
Previous Message Magnus Hagander 2007-11-08 06:46:43 Re: System V IPC on Windows