Re: How to list databases with SQL statement?

From: Quinton Delpeche <quintond(at)vippayroll(dot)co(dot)za>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to list databases with SQL statement?
Date: 2004-11-23 04:52:40
Message-ID: 200411230652.45353.quintond@vippayroll.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Saturday 20 November 2004 02:39, Marian D Marinov wrote:
> Hello,
> Is there a way to list all databases which belong to the current user with
> an SQL query?

I am not sure about a SQL Query.

But if you login to the database using the command line psql interface and run

\l

it will give you output similar to this:

intsys=> \l
List of databases
Name | Owner | Encoding
-----------+----------+-----------
intsys | intsys | SQL_ASCII
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
(3 rows)

intsys=>

Not sure if this will help you.

> Regards M.Marinov

Q
--
Quinton Delpeche
Internal Systems Developer
Softline VIP

Telephone: +27 12 420 7000
Direct: +27 12 420 7007
Facsimile: +27 12 420 7344

http://www.vippayroll.co.za/

Anarchy may not be the best form of government, but it's better than no
government at all.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2004-11-23 04:56:40 Re: How to list databases with SQL statement?
Previous Message Marc G. Fournier 2004-11-23 03:28:51 PostgreSQL 8.0.0 Beta 5 Now Available