Re: [GENERAL] get the list of databases

From: "Doran L(dot) Barton" <fozz(at)iodynamics(dot)com>
To: Xavier COUDIN <xavier(at)nnc(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] get the list of databases
Date: 1999-10-05 16:24:11
Message-ID: 19991005102411.A28097@iodynamics.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Not long ago, Xavier COUDIN proclaimed...
> using psql, it is possible to get the list of databases using the
> instruction "\l".
>
> How can I do when I make connection through DBI/DBD ?????

Well you need to connect to *some* database (i.e. template1) and then you
can issue the following SQL query:

SELECT * FROM PG_DATABASE;

Enjoy.

--
Doran L. Barton <fozz(at)iodynamics(dot)com>
Iodynamics LLC -- "Internetworking the masses"
<URL:http://www.iodynamics.com/>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mengzhi Wang 1999-10-05 17:58:00 Disk Access Information
Previous Message Xavier COUDIN 1999-10-05 14:11:50 get the list of databases