Re: 7.4, 'group by' default ordering? - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: 7.4, 'group by' default ordering?
Date
Msg-id 20040109053537.GA16742@wolff.to
Whole thread Raw
In response to Re: 7.4, 'group by' default ordering?  (Ron St-Pierre <rstpierre@syscor.com>)
List pgsql-general
On Thu, Jan 08, 2004 at 15:24:41 -0800,
  Ron St-Pierre <rstpierre@syscor.com> wrote:
> Celko uses the SQL92 13.1 rule wording: "Whether a sort key value that
> is NULL is considered greater or less than a non-NULL value is
> implementation defined, but all sort key values that are NULL will
> either be considered greater than all non-NULL values or be considered
> less than all non-NULL values. There are SQL products that do it either
> way."  2nd Ed SQL For Smarties.

The part just after that prompted my statement. The text is:
And there are those that have it all wrong; the Sybase family simply
treats the NULLs as if they were really values -- that is, they sort
low for ascending and high for descending.

This seems to me to be saying contradictory things now that I have reread it.
If NULLs are treated as real values, I would expect them to be output
first for one of descending and ascending and last for the other. But
the second part of the statement contradicts this and seems to be saying
that Sybase always emits records with NULL values for the key first.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Natural upgrade path for RedHat 9?
Next
From: Oleg Bartunov
Date:
Subject: Re: [HACKERS] Announce: Search PostgreSQL related resources