Re: Issue dumping schema using readonly user

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Issue dumping schema using readonly user
Дата
Msg-id 20150217231942.GG6717@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Issue dumping schema using readonly user  (Melvin Davidson <melvin6925@gmail.com>)
Список pgsql-general
Melvin,

* Melvin Davidson (melvin6925@gmail.com) wrote:
> Simply put, giving access to a schema DOES NOT automatically give access to
> any table in the schema. So if you want a specific user ( or role) to be
> able to read (or pg_dump) all tables in the schema, then you must GRANT
> SELECT of all tables in that schema to the user (or role).

That's not the question at hand, however.  He's not asking about
dumping out the records of the table but rather about pulling out the
schema, which any user can do, regardless of their permissions on the
tables.  There's no need to 'grant select' access on a table, or even
to 'grant usage' on the schema, simply issue queries against the
catalog.

pg_dump is going beyond what's strictly necessary for a schema-only dump
though, it's trying to lock all of the tables too, which really isn't
necessary in this case.

    Thanks,

        Stephen

Вложения

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

Предыдущее
От: Melvin Davidson
Дата:
Сообщение: Re: Issue dumping schema using readonly user
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Issue dumping schema using readonly user