Re: Newbie question: How to check how many user avaliable at postgreSQL?

From: Nils Zonneveld <nils(at)mbit(dot)nl>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Newbie question: How to check how many user avaliable at postgreSQL?
Date: 2001-06-13 16:59:18
Message-ID: 3B279BE4.D45471FB@mbit.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Carfield Yim wrote:
>
> Carfield Yim wrote:
> >
> > I am a new user of PostgreSQL dbms, how can I check how many users
> > avaliable at PostgreSQL?
>
> I mean the user created by createuser command.

To get a listing of all the catalogtables:

select relname from pg_class where relname like 'pg_%';

You will discover that this includes the table pg_user. To get a listing
of all the users in the postgres installation:

select usename from pg_user;

HTH,

Nils Zonneveld

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Cramer 2001-06-13 16:59:31 Log files, how to rotate properly
Previous Message Tom Lane 2001-06-13 16:57:50 Re: pg_dump problem