Re: Failure loading materialized view with pg_restore

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Failure loading materialized view with pg_restore
Дата
Msg-id 1380.1424273673@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Failure loading materialized view with pg_restore  (Brian Sutherland <brian@vanguardistas.net>)
Ответы Re: Failure loading materialized view with pg_restore  (Brian Sutherland <brian@vanguardistas.net>)
Список pgsql-general
Brian Sutherland <brian@vanguardistas.net> writes:
> If I run this set of commands against PostgreSQL 9.4.1 I pg_restore
> throws an error with a permission problem. Why it does so is a mystery
> to me, given that the user performing the restore is a superuser:

The same thing would happen without any dump and restore:

regression=# create user nobody;
CREATE ROLE
regression=# CREATE TABLE x (y int);
CREATE TABLE
regression=# CREATE MATERIALIZED VIEW myview AS select * from x;
SELECT 0
regression=# ALTER TABLE myview OWNER TO "nobody";
ALTER TABLE
regression=# REFRESH MATERIALIZED VIEW myview;
ERROR:  permission denied for relation x

User "nobody" does not have permission to read table x, so the REFRESH
fails, because the view's query executes as the view's owner.

            regards, tom lane


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

Предыдущее
От: Medhavi Mahansaria
Дата:
Сообщение: #Personal#: Reg: Multiple queries in a transaction
Следующее
От: Bill Moran
Дата:
Сообщение: Re: #Personal#: Reg: Multiple queries in a transaction