Re: 7.4, 'group by' default ordering?
От | Bruno Wolff III |
---|---|
Тема | Re: 7.4, 'group by' default ordering? |
Дата | |
Msg-id | 20040109053537.GA16742@wolff.to обсуждение исходный текст |
Ответ на | Re: 7.4, 'group by' default ordering? (Ron St-Pierre <rstpierre@syscor.com>) |
Список | 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 по дате отправления: