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

From: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
To: "Ron de Jong" <Ron(dot)Antispam(at)news(dot)tht(dot)net>
Cc: 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-18 14:09:30
Message-ID: 15310.58010.134488.50654@elsick.csl.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

See the pg_database table:

http://www.postgresql.org/idocs/index.php?catalog-pg-database.html

Regards, Lee.

Ron de Jong writes:
> 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
>
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-10-18 14:55:33 Re: To Postgres Devs : Wouldn't changing the select limit
Previous Message Andy Hallam 2001-10-18 11:32:54 ODBC SQLBindParameter and UNICODE strings