Re: How to list user accounts?

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: How to list user accounts?
Дата
Msg-id 1121195544.8208.242.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на How to list user accounts?  (Thanh Q Lam <thanh.q.lam@alcatel.com>)
Список pgsql-admin
On Tue, 2005-07-12 at 13:59, Thanh Q Lam wrote:
> Hi,
>
> Is there a command/option to list all database user accounts in postgres?

From the psql monitor:

\du

via sql:

SELECT u.usename AS "User name",
  u.usesysid AS "User ID",
  CASE WHEN u.usesuper AND u.usecreatedb THEN CAST('superuser, create
database' AS pg_catalog.text)
       WHEN u.usesuper THEN CAST('superuser' AS pg_catalog.text)
       WHEN u.usecreatedb THEN CAST('create database' AS
pg_catalog.text)
       ELSE CAST('' AS pg_catalog.text)
  END AS "Attributes"
FROM pg_catalog.pg_user u
ORDER BY 1;

(what psql does behind the scenes when you type \du)

В списке pgsql-admin по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: How to list user accounts?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: How to list user accounts?