Re: List of postgreSQL databases - Mailing list pgsql-admin

From Tom Lane
Subject Re: List of postgreSQL databases
Date
Msg-id 14921.1273517574@sss.pgh.pa.us
Whole thread Raw
In response to Re: List of postgreSQL databases  (Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>)
List pgsql-admin
"Andreas 'ads' Scherbaum" <adsmail@wars-nicht.de> 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

pgsql-admin by date:

Previous
From: Andreas 'ads' Scherbaum
Date:
Subject: Re: List of postgreSQL databases
Next
From: Evan Rempel
Date:
Subject: PgPool-II - does it do re-connect?