Re: How to list databases with SQL statement? - Mailing list pgsql-general

From John DeSoi
Subject Re: How to list databases with SQL statement?
Date
Msg-id F04A49AD-3D0D-11D9-89F1-000A95B03262@pgedit.com
Whole thread Raw
In response to How to list databases with SQL statement?  (Marian D Marinov <hackman@hydra.azilian.net>)
List pgsql-general
On Nov 19, 2004, at 7:39 PM, Marian D Marinov wrote:

> Hello,
> Is there a way to list all databases which belong to the current user
> with an
> SQL query?


select datname, usename
    from pg_catalog.pg_database, pg_catalog.pg_user
    where datdba = usesysid and usename = current_user;


Best,

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: How to list databases with SQL statement?
Next
From: "Ramesh Patel"
Date:
Subject: