Re: Default order of select datname from pg_database - Mailing list pgsql-admin

From David G Johnston
Subject Re: Default order of select datname from pg_database
Date
Msg-id 1397922291602-5800802.post@n5.nabble.com
Whole thread Raw
In response to Re: Default order of select datname from pg_database  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Tom Lane-2 wrote
> =?UTF-8?B?RWzDrWFzIERhdmlk?= <

> elias.moreno.tec@

> > writes:
>> By any change, does the following query have an "order by" by default
>> when
>> omitted?:
>
>> select datname from pg_database;
>
> No.  No SQL query ever has a "default" order by.

While not applicable here you can define a view to include an order by so
that a plain select on the view is indeed ordered even though the explicit
code provided by the user does not specify an order.

I'm doubting, though, that any of the information schema views do this.

David J.



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Default-order-of-select-datname-from-pg-database-tp5800783p5800802.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Default order of select datname from pg_database
Next
From: Elías David
Date:
Subject: Re: Default order of select datname from pg_database