pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: dumb question: how to get a list of databases?
2+ messages / 2 participants
[nested] [flat]

* Re: dumb question: how to get a list of databases?
@ 2002-12-03 11:34  monika.koenig@bonn.de
  0 siblings, 1 reply; 2+ messages in thread

From: monika.koenig@bonn.de @ 2002-12-03 11:34 UTC (permalink / raw)
  To: pgsql-admin

Jack Flak <jack@jackflak.net> wrote in message news:<9MEG9.2902$PK6.160071979@newssvr14.news.prodigy.com>...
> Greetings group,
> 
> How do I get a list of current, existing databases (catalogs) for my 
> current installation?
> 
> Also: how do I find out my current version in linux?  I ran this:
> 
>    /usr/local/pgsql/bin/psql --version
> 
> and I got this:
> 
>    psql (PostgreSQL) 7.1
> 
> So it looks like I'm currently running 7.1.  Is this the only way to 
> find out?
> 
> Thanks for your time.
> 
> 
> (Email address is invalid to prevent more spam)
you can use a simple sql to find it out.

try: select datname from pg_database ;



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

* Re: dumb question: how to get a list of databases?
@ 2002-12-04 01:09  Jack Flak <jack@flak.net>
  parent: monika.koenig@bonn.de
  0 siblings, 0 replies; 2+ messages in thread

From: Jack Flak @ 2002-12-04 01:09 UTC (permalink / raw)
  To: pgsql-admin

Thanks for the help!  That worked just fine.

I also found this (from within psql):

# \l
  List of databases
 Database  |  Owner
-----------+----------
 template0 | postgres
 template1 | postgres
 testdb    | postgres
(3 rows)

And this from command-line:

$ /usr/local/pgsql/bin/psql -l
Password:
  List of databases
 Database  |  Owner
-----------+----------
 template0 | postgres
 template1 | postgres
 testdb    | postgres
(3 rows)

Thanks again! 


M.König wrote:

> Jack Flak <jack@jackflak.net> wrote in message
> news:<9MEG9.2902$PK6.160071979@newssvr14.news.prodigy.com>...
>> Greetings group,
>> 
>> How do I get a list of current, existing databases (catalogs) for my
>> current installation?
>> 
>> Also: how do I find out my current version in linux?  I ran this:
>> 
>>    /usr/local/pgsql/bin/psql --version
>> 
>> and I got this:
>> 
>>    psql (PostgreSQL) 7.1
>> 
>> So it looks like I'm currently running 7.1.  Is this the only way to
>> find out?
>> 
>> Thanks for your time.
>> 
>> 
>> (Email address is invalid to prevent more spam)
> you can use a simple sql to find it out.
> 
> try: select datname from pg_database ;
> 




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


end of thread, other threads:[~2002-12-04 01:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-12-03 11:34 Re: dumb question: how to get a list of databases? monika.koenig@bonn.de
2002-12-04 01:09 ` Jack Flak <jack@flak.net>

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