pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
get list of databases and tables in Postgres
7+ messages / 7 participants
[nested] [flat]

* get list of databases and tables in Postgres
@ 2004-03-01 11:00 Wim Paulussen <wim@chen.be>
  2004-03-01 11:41 ` Re: get list of databases and tables in Postgres Majolee InfoTech <info@majolee.info>
  0 siblings, 1 reply; 7+ messages in thread

From: Wim Paulussen @ 2004-03-01 11:00 UTC (permalink / raw)
  To: pgsql-php

LS,

Hope you can help : I am looking for equivalent sql statement for the 
following in MySQL :
SHOW DATABASES

I found out that for the tables you can connect to a Postgresql specific 
table information_schema.tables , but what is the corresponding table 
for the names of databases under Postgresql ?

All help is highly appreciated.





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: get list of databases and tables in Postgres
  2004-03-01 11:00 get list of databases and tables in Postgres Wim Paulussen <wim@chen.be>
@ 2004-03-01 11:41 ` Majolee InfoTech <info@majolee.info>
  2004-03-01 14:29   ` Re: get list of databases and tables in Postgres Chris Boget <chris@wild.net>
  2004-03-01 21:10   ` Re: get list of databases and tables in Postgres Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br>
  0 siblings, 2 replies; 7+ messages in thread

From: Majolee InfoTech @ 2004-03-01 11:41 UTC (permalink / raw)
  To: Wim Paulussen <wim@chen.be>; +Cc: pgsql-php

Use:

select datname from pg_database;

===============
Mihir & Biren
Partners
Majolee InfoTech
===============
----- Original Message ----- 
From: "Wim Paulussen" <wim@chen.be>
To: <pgsql-php@postgresql.org>
Sent: Monday, March 01, 2004 4:30 PM
Subject: [PHP] get list of databases and tables in Postgres


> LS,
>
> Hope you can help : I am looking for equivalent sql statement for the
> following in MySQL :
> SHOW DATABASES
>
> I found out that for the tables you can connect to a Postgresql specific
> table information_schema.tables , but what is the corresponding table
> for the names of databases under Postgresql ?
>
> All help is highly appreciated.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
>
>




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: get list of databases and tables in Postgres
  2004-03-01 11:00 get list of databases and tables in Postgres Wim Paulussen <wim@chen.be>
  2004-03-01 11:41 ` Re: get list of databases and tables in Postgres Majolee InfoTech <info@majolee.info>
@ 2004-03-01 14:29   ` Chris Boget <chris@wild.net>
  2004-03-01 20:58     ` Re: get list of databases and tables in Postgres D. Wokan <wokan@cox.net>
  2004-03-01 22:30     ` Re: get list of databases and tables in Postgres Chris Smith <chris@interspire.com>
  1 sibling, 2 replies; 7+ messages in thread

From: Chris Boget @ 2004-03-01 14:29 UTC (permalink / raw)
  To: Majolee InfoTech <info@majolee.info>; Wim Paulussen <wim@chen.be>; +Cc: pgsql-php

> select datname from pg_database;

Or simply:

\d

unless I'm missing something...

Chris




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: get list of databases and tables in Postgres
  2004-03-01 11:00 get list of databases and tables in Postgres Wim Paulussen <wim@chen.be>
  2004-03-01 11:41 ` Re: get list of databases and tables in Postgres Majolee InfoTech <info@majolee.info>
  2004-03-01 14:29   ` Re: get list of databases and tables in Postgres Chris Boget <chris@wild.net>
@ 2004-03-01 20:58     ` D. Wokan <wokan@cox.net>
  1 sibling, 0 replies; 7+ messages in thread

From: D. Wokan @ 2004-03-01 20:58 UTC (permalink / raw)
  To: pgsql-php

Chris Boget wrote:

>>select datname from pg_database;
> Or simply:
> \d
> unless I'm missing something...
> Chris

Would PGSQL respond to that as a query?
--
D. Wokan



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: get list of databases and tables in Postgres
  2004-03-01 11:00 get list of databases and tables in Postgres Wim Paulussen <wim@chen.be>
  2004-03-01 11:41 ` Re: get list of databases and tables in Postgres Majolee InfoTech <info@majolee.info>
  2004-03-01 14:29   ` Re: get list of databases and tables in Postgres Chris Boget <chris@wild.net>
@ 2004-03-01 22:30     ` Chris Smith <chris@interspire.com>
  2004-03-01 22:31       ` Re: get list of databases and tables in Postgres scott.marlowe <scott.marlowe@ihs.com>
  1 sibling, 1 reply; 7+ messages in thread

From: Chris Smith @ 2004-03-01 22:30 UTC (permalink / raw)
  To: 'Chris Boget' <chris@wild.net>; 'Majolee InfoTech' <info@majolee.info>; 'Wim Paulussen' <wim@chen.be>; +Cc: pgsql-php

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





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: get list of databases and tables in Postgres
  2004-03-01 11:00 get list of databases and tables in Postgres Wim Paulussen <wim@chen.be>
  2004-03-01 11:41 ` Re: get list of databases and tables in Postgres Majolee InfoTech <info@majolee.info>
  2004-03-01 14:29   ` Re: get list of databases and tables in Postgres Chris Boget <chris@wild.net>
  2004-03-01 22:30     ` Re: get list of databases and tables in Postgres Chris Smith <chris@interspire.com>
@ 2004-03-01 22:31       ` scott.marlowe <scott.marlowe@ihs.com>
  0 siblings, 0 replies; 7+ messages in thread

From: scott.marlowe @ 2004-03-01 22:31 UTC (permalink / raw)
  To: Chris Smith <chris@interspire.com>; +Cc: 'Chris Boget' <chris@wild.net>; 'Majolee InfoTech' <info@majolee.info>; 'Wim Paulussen' <wim@chen.be>; 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@postgresql.org
> [mailto:pgsql-php-owner@postgresql.org] On Behalf Of Chris Boget
> Sent: Tuesday, March 02, 2004 1:29 AM
> To: Majolee InfoTech; Wim Paulussen
> Cc: pgsql-php@postgresql.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@postgresql.org)
> 




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: get list of databases and tables in Postgres
  2004-03-01 11:00 get list of databases and tables in Postgres Wim Paulussen <wim@chen.be>
  2004-03-01 11:41 ` Re: get list of databases and tables in Postgres Majolee InfoTech <info@majolee.info>
@ 2004-03-01 21:10   ` Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br>
  1 sibling, 0 replies; 7+ messages in thread

From: Ângelo Marcos Rigo @ 2004-03-01 21:10 UTC (permalink / raw)
  To: Majolee InfoTech <info@majolee.info>; Wim Paulussen <wim@chen.be>; +Cc: pgsql-php

using psql 
psql -l

=====
Ângelo Marcos Rigo
AMR Informática 
(51) 3348 0870 
Rua Pe. Alois Kades 400/210 
Porto Alegre /RS/Brasil
http://amr.freezope.org
angelo_rigo@yahoo.com.br
 


______________________________________________________________________

Yahoo! Mail - O melhor e-mail do Brasil! Abra sua conta agora:
http://br.yahoo.com/info/mail.html



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2004-03-01 22:31 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-03-01 11:00 get list of databases and tables in Postgres Wim Paulussen <wim@chen.be>
2004-03-01 11:41 ` Majolee InfoTech <info@majolee.info>
2004-03-01 14:29   ` Chris Boget <chris@wild.net>
2004-03-01 20:58     ` D. Wokan <wokan@cox.net>
2004-03-01 22:30     ` Chris Smith <chris@interspire.com>
2004-03-01 22:31       ` scott.marlowe <scott.marlowe@ihs.com>
2004-03-01 21:10   ` Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox