Re: column order

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: column order
Дата
Msg-id D2AB135B-BF96-472F-842C-766ACA657B37@seespotcode.net
обсуждение исходный текст
Ответ на Re: column order  ("Florian G. Pflug" <fgp@phlo.org>)
Список pgsql-general
On May 24, 2006, at 22:36 , Florian G. Pflug wrote:

> Michael Glaesemann wrote:
>> On May 24, 2006, at 11:54 , nuno wrote:
>>> does postgresql guarantee you that
>>> the columns in the result set would be ordered
>>> as specified in the query (i.e. id, firstname, lastname, dob) ?
>> No. If you want a specific order, use the ORDER BY clause.
> I think the OP was talking about the order by the _columns_, not
> the _rows_.
>
> Postgres guarantees that order - Anything else would be simply insane.

Wow. I didn't even consider that's what was being asked. (Does that
make me sane?) I had assumed he mean the rows would be ordered in the
order of the columns. For example,

select foo, bar, baz
from blurfl

would be (by default) equivalent to

select foo, bar, baz
from blurfl
order by foo, bar, baz.

Thanks, Florian (and Andreas) for the sanity check. (Still haven't
heard back from the OP though.)


Michael Glaesemann
grzm seespotcode net




В списке pgsql-general по дате отправления:

Предыдущее
От: Joel Alejandro Espinosa Carra
Дата:
Сообщение: Re: JDBC issue
Следующее
От: TJ O'Donnell
Дата:
Сообщение: recompliing c-language functions with new releases of postgres