Re: dumb question: how to get a list of databases?

From: Jack Flak <jack(at)flak(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: dumb question: how to get a list of databases?
Date: 2002-12-04 01:09:42
Message-ID: qBcH9.4826$%23.192795908@newssvr21.news.prodigy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)jackflak(dot)net> wrote in message
> news:<9MEG9(dot)2902$PK6(dot)160071979(at)newssvr14(dot)news(dot)prodigy(dot)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 ;
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message EMOTO Masahiko 2002-12-04 01:59:43 PAM
Previous Message Devinder K Rajput 2002-12-03 23:14:36 Command for restart in the contrib/linux script