Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WbXRp-0006AV-5r for pgsql-admin@arkaria.postgresql.org; Sat, 19 Apr 2014 15:44:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WbXRo-0006L4-Fo for pgsql-admin@arkaria.postgresql.org; Sat, 19 Apr 2014 15:44:56 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WbXRn-0006Ky-Mq for pgsql-admin@postgresql.org; Sat, 19 Apr 2014 15:44:55 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WbXRl-0003BA-4Y for pgsql-admin@postgresql.org; Sat, 19 Apr 2014 15:44:54 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1WbXRj-0001SG-Kz for pgsql-admin@postgresql.org; Sat, 19 Apr 2014 08:44:51 -0700 Date: Sat, 19 Apr 2014 08:44:51 -0700 (PDT) From: David G Johnston To: pgsql-admin@postgresql.org Message-ID: <1397922291602-5800802.post@n5.nabble.com> In-Reply-To: <24744.1397920655@sss.pgh.pa.us> References: <24744.1397920655@sss.pgh.pa.us> Subject: Re: Default order of select datname from pg_database MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 3.5 (+++) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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. -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin