Full access to a DB with a second user?

Поиск
Список
Период
Сортировка
От Erik Wasser
Тема Full access to a DB with a second user?
Дата
Msg-id 200409051453.57182.erik.wasser@iquer.net
обсуждение исходный текст
Ответы Re: Full access to a DB with a second user?
Список pgsql-sql
Hello pgsql-sql@postgresql.org,

how can I gave a user full access (SELECT, INSERT,...) to a database 
that he doesn't own? I used google to find a solution and I find a 
Statement[1] that will the do the trick. But it looks very cryptical to 
me. B-) What does this statement do?

> \a
> \t
> \o /tmp/grant.sql
> SELECT      'GRANT ALL ON ' || n.nspname || '.' || c.relname ||
>          ' TO joe;'
> FROM      pg_catalog.pg_class AS c
>          LEFT JOIN pg_catalog.pg_namespace AS n
>               ON n.oid = c.relnamespace
> WHERE     c.relkind IN ('r','v','S') AND
>          n.nspname NOT IN ('pg_catalog', 'pg_toast') AND
>          pg_catalog.pg_table_is_visible(c.oid)
> ORDER BY  n.nspname, c.relname;
> \o
> \i /tmp/grant.sql

Any hint is welcome. B-)

[1]http://www.mail-archive.com/pgsql-admin@postgresql.org/msg14416.html

-- 
So long... Fuzz


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

Предыдущее
От: Jeff Boes
Дата:
Сообщение: Re: Complicated "group by" question
Следующее
От: "Daniel M."
Дата:
Сообщение: Storing properties in a logical way.