Re: Default order of select datname from pg_database

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: Default order of select datname from pg_database
Дата
Msg-id 1397922291602-5800802.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: Default order of select datname from pg_database  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Default order of select datname from pg_database
Следующее
От: Elías David
Дата:
Сообщение: Re: Default order of select datname from pg_database