Re: get list of databases and tables in Postgres

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Chris Smith <chris(at)interspire(dot)com>
Cc: "'Chris Boget'" <chris(at)wild(dot)net>, "'Majolee InfoTech'" <info(at)majolee(dot)info>, "'Wim Paulussen'" <wim(at)chen(dot)be>, <pgsql-php(at)postgresql(dot)org>
Subject: Re: get list of databases and tables in Postgres
Date: 2004-03-01 22:31:17
Message-ID: Pine.LNX.4.33.0403011530580.1074-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

If you're running 7.4, look into the iformation_schema for such things.
That likely won't change.

On Tue, 2 Mar 2004, Chris Smith wrote:

> He wants to do it through PHP - so I don't think this will work.
>
> You could always
>
> psql -E -l
>
> BUT - that query *could* change depending on the version of postgresql
> you're running.
>
> Chris.
>
> -----Original Message-----
> From: pgsql-php-owner(at)postgresql(dot)org
> [mailto:pgsql-php-owner(at)postgresql(dot)org] On Behalf Of Chris Boget
> Sent: Tuesday, March 02, 2004 1:29 AM
> To: Majolee InfoTech; Wim Paulussen
> Cc: pgsql-php(at)postgresql(dot)org
> Subject: Re: [PHP] get list of databases and tables in Postgres
>
>
> > select datname from pg_database;
>
> Or simply:
>
> \d
>
> unless I'm missing something...
>
> Chris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Seader, Cameron 2004-03-01 23:50:15 pg_fetch_row Problem
Previous Message Chris Smith 2004-03-01 22:30:49 Re: get list of databases and tables in Postgres