Обсуждение: getting a list of users

Поиск
Список
Период
Сортировка

getting a list of users

От
"Adler, Stephen"
Дата:
how do you get a list of users and what their permissions are.
how do you get a list of databases.
how do you get a description of a table as you would with
  the command 'describe table blaaa' in mysql.

I've just started using postresql today. Thanks.

Steve.




Re: getting a list of users

От
Oliver Elphick
Дата:
On Fri, 2002-11-29 at 20:56, Adler, Stephen wrote:
> how do you get a list of users and what their permissions are.

SELECT * FROM pg_user;

Permissions granted on various objects are shown by \z inside psql.

> how do you get a list of databases.

From a Unix prompt: psql -l
Inside psql:        \l
              or:   SELECT * FROM pg_databases;

> how do you get a description of a table as you would with
>   the command 'describe table blaaa' in mysql.

\d blaaa
\d+ blaaa    will show comments, if any.


All the \x commands use fairly complicated SQL to do their jobs.  Start
psql with the -E option to see what they are actually doing.

> I've just started using postresql today. Thanks.

A good choice!

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Who shall ascend into the hill of the LORD? or who
      shall stand in his holy place? He that hath clean
      hands, and a pure heart..."            Psalms 24:3,4

Вложения