pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David G Johnston <david.g.johnston@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: Default order of select datname from pg_database
Date: Sat, 19 Apr 2014 08:44:51 -0700 (PDT)
Message-ID: <1397922291602-5800802.post@n5.nabble.com> (raw)
In-Reply-To: <24744.1397920655@sss.pgh.pa.us>
References: <CANNE3r1gyetpfiU_FWRtozD=cif7cphdWgz8RzPYYk-mKTrfVg@mail.gmail.com>
	<24744.1397920655@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Tom Lane-2 wrote
> =?UTF-8?B?RWzDrWFzIERhdmlk?= &lt;

> elias.moreno.tec@

> &gt; 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-tp5800783p5...
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (5+ messages)  latest in thread

Message-ID: <1397922291602-5800802.post@n5.nabble.com>
Permalink:  ../1397922291602-5800802.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1397922291602-5800802.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: david.g.johnston@gmail.com
  Subject: Re: Default order of select datname from pg_database
  In-Reply-To: <1397922291602-5800802.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox