Re: get list of databases and tables in Postgres

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxxxxxxxxx
> [mailto:pgsql-php-owner@xxxxxxxxxxxxxx] On Behalf Of Chris Boget
> Sent: Tuesday, March 02, 2004 1:29 AM
> To: Majolee InfoTech; Wim Paulussen
> Cc: pgsql-php@xxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxx)
> 



[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux