pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jack Flak <jack@flak.net>
To: pgsql-admin@postgresql.org
Subject: Re: dumb question: how to get a list of databases?
Date: Wed, 04 Dec 2002 01:09:42 GMT
Message-ID: <qBcH9.4826$%23.192795908@newssvr21.news.prodigy.com> (raw)
References: <9MEG9.2902$PK6.160071979@newssvr14.news.prodigy.com>
	<cba90948.0212030334.5f813266@posting.google.com>

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 ;
> 




view thread (2+ messages)

Message-ID: <qBcH9.4826$%23.192795908@newssvr21.news.prodigy.com>
Permalink:  ../qBcH9.4826$%2523.192795908@newssvr21.news.prodigy.com/
Also on:    postgresql.org/message-id/qBcH9.4826$%23.192795908@newssvr21.news.prodigy.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jack@flak.net
  Subject: Re: dumb question: how to get a list of databases?
  In-Reply-To: <qBcH9.4826$%23.192795908@newssvr21.news.prodigy.com>
  References: <9MEG9.2902$PK6.160071979@newssvr14.news.prodigy.com> <cba90948.0212030334.5f813266@posting.google.com> <qBcH9.4826$%23.192795908@newssvr21.news.prodigy.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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