Re: How do I list all users and all databases.

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: MattStan <mattstan(at)blueyonder(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How do I list all users and all databases.
Date: 2002-04-15 13:39:23
Message-ID: 1018877964.22457.21.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2002-04-08 at 16:09, MattStan wrote:
> Hi everyone,
>
> During testing of my postgresql install I created several users and
> databases, now I can't remember exactly what I added. Can someone kindly
> tell me how to list all user names and all databases, I can't seem to
> work out how to do this. Thanks for your help.

SELECT * FROM pg_user;

SELECT * FROM pg_database; (or, in psql, \l)

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C

"And they questioned Him, saying "...Is it lawful for
us to pay taxes to Caesar, or not? ...And He said to
them "...render to Caesar the things that are
Caesar's, and to God the things that are God's."
Luke 20:21,22,25

In response to

Browse pgsql-general by date

  From Date Subject
Next Message William N. Zanatta 2002-04-15 13:58:09 Re: Postgresql installation problem
Previous Message Marin Dimitrov 2002-04-15 13:22:09 Re: How do I list all users and all databases.