Re: List of postgreSQL databases

From: Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: List of postgreSQL databases
Date: 2010-05-10 18:40:01
Message-ID: 20100510204001.308bd971@platin.wars-nicht.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


Hello,

I want to raise this topic again.

On Tue, 6 Apr 2010 15:39:35 +0400 Sergey Konoplev wrote:

> On 6 April 2010 15:22, Renato Oliveira <renato(dot)oliveira(at)grant(dot)co(dot)uk>
> wrote:
> > Is there a specific ‘STATEMENT’ to display the same thing?
>
> Try this
>
> SELECT datname FROM pg_database;

Is this guaranteed to stay forever? Right now I'm developing a tool
which needs to fetch the lost of available databases. Everytime
I implement a query using pg_* (even such a simple one) I have a bad
feeling about possible future compatibility issues.

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?

Bye

--
Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2010-05-10 18:52:54 Re: List of postgreSQL databases
Previous Message Greg Spiegelberg 2010-05-10 13:52:20 Re: postgres invoked oom-killer