Re: grant select script

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: grant select script
Дата
Msg-id 4D932ABC020000250003BF9D@gw.wicourts.gov
обсуждение исходный текст
Ответ на grant select script  (Marc Fromm <Marc.Fromm@wwu.edu>)
Список pgsql-admin
Marc Fromm <Marc.Fromm@wwu.edu> wrote:

> I am working with a script to automate grant select to all tables
> in a database to a user.

You don't say what version you're using, but if it's available, you
might want to use the GRANT SELECT ON ALL TABLES IN SCHEMA syntax.

> The data base cswe2 does not contain the table sql_languages,
> unless it is hidden. Is there a way to tell the script to ignore
> them?
> GRANT SELECT ON TABLE sql_languages to tom;
> ERROR:  relation "sql_languages" does not exist

It looks like you're not dealing with schema properly.  To learn how
to write queries for that, it can help to run psql with the -E
switch and use the \d commands.

-Kevin

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

Предыдущее
От: Marc Fromm
Дата:
Сообщение: grant select script
Следующее
От: Bob Lunney
Дата:
Сообщение: Re: grant select script