How do I get a list of DB's or Tables with a postgres SQL statement?

From: "Ron de Jong" <radejong(at)planet(dot)nl>
To: pgsql-hackers(at)postgresql(dot)org
Subject: How do I get a list of DB's or Tables with a postgres SQL statement?
Date: 2001-10-17 11:45:22
Message-ID: 9qjr1g$rle$1@reader05.wxs.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

All,

How do I get a list of DB's or Tables with a postgres SQL statement?
It needs to be an SQL statement otherwise perl/DBI/prepare won't parse it.
I know there is some funtions in psql:

\l (show databases)
\d (show tables)

which work fine from psql, but these
statements won't be parsed by perl, DBI

I also know there is an object:

@names = $dbh->tables;

but what about databases?

Please help.

Ron de Jong
the Netherlands

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bill Studenmund 2001-10-17 13:48:05 Re: Package support for Postgres
Previous Message Lee Kindness 2001-10-17 09:00:31 Re: ecpg - GRANT bug