Re: how do I grant select to one user for all tables in a DB?

Поиск
Список
Период
Сортировка
От Chris Angelico
Тема Re: how do I grant select to one user for all tables in a DB?
Дата
Msg-id CAPTjJmr+qtPysNfN6rLddGSxEb6faiV-Vfp1Rz9ZEbdVCiPkng@mail.gmail.com
обсуждение исходный текст
Ответ на how do I grant select to one user for all tables in a DB?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Ответы Re: how do I grant select to one user for all tables in a DB?
Список pgsql-general
On Wed, Dec 5, 2012 at 2:12 PM, Gauthier, Dave <dave.gauthier@intel.com> wrote:
> V9.1.5 on linux
> User "select" created (yup, that's right, they want the user name to be
> "select".  Guess what ptivs it is to have! Don't kill the messanger :-) )
>
> postgres=# grant select on all tables in schema sde to "select";
>
> ERROR:  schema "sde" does not exist
>
> postgres=# \l
>
>                               List of databases

Your immediate problem is that sde is a database, not a schema.
They're different things, despite MySQL conflating the terms.

What you're trying to do is a perfectly reasonable way to create a
backup user. And it's definitely possible; check out ALTER DEFAULT
PRIVILEGES:

http://www.postgresql.org/docs/9.1/static/sql-alterdefaultprivileges.html

I think that's what you need there!

ChrisA


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

Предыдущее
От: tim_wilson
Дата:
Сообщение: Re: Statistics mismatch between n_live_tup and actual row count
Следующее
От: daniel
Дата:
Сообщение: Re: ts_headline and query with hyphen