Search Postgresql Archives

Re: column order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux