Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id C98CF633813 for ; Mon, 10 May 2010 15:53:07 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 91520-03 for ; Mon, 10 May 2010 18:52:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 257D5633B05 for ; Mon, 10 May 2010 15:52:56 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o4AIqsi5014922; Mon, 10 May 2010 14:52:55 -0400 (EDT) To: "Andreas 'ads' Scherbaum" cc: pgsql-admin@postgresql.org Subject: Re: List of postgreSQL databases In-reply-to: <20100510204001.308bd971@platin.wars-nicht.de> References: <7965A9DCF12CC14984420BCC37B1608F25ABF30DE5@Elzar.grant.co.uk> <20100510204001.308bd971@platin.wars-nicht.de> Comments: In-reply-to "Andreas 'ads' Scherbaum" message dated "Mon, 10 May 2010 20:40:01 +0200" Date: Mon, 10 May 2010 14:52:54 -0400 Message-ID: <14921.1273517574@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/115 X-Sequence-Number: 34588 "Andreas 'ads' Scherbaum" writes: >> SELECT datname FROM pg_database; > Is this guaranteed to stay forever? It seems reasonably unlikely that we'd change it. Even if we did, we have in the past provided compatibility views (cf pg_user, pg_shadow) when removing a catalog --- I would think the same would happen for pg_database if we ever removed it. > Isn't there a way to make the list of databases available in > information_schema and change this view whenever the underlaying > structure might change? The point of information_schema is that it's standardized. There is no view in the SQL standard that corresponds to a list of databases. If you think there ought to be, take it up with the SQL committee. regards, tom lane