Re: BUG #16202: Cannot restore database that has materialized view using crosstab (tablefunc)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16202: Cannot restore database that has materialized view using crosstab (tablefunc)
Дата
Msg-id 12604.1578679445@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #16202: Cannot restore database that has materialized view using crosstab (tablefunc)  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #16202: Cannot restore database that has materialized viewusing crosstab (tablefunc)  (Wagner Engel <wagner.engel@gmail.com>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> If I build a materizalized view that uses the crosstab() function, a
> dump/restore cycle will not restore the database.

> CREATE VIEW v AS
> SELECT * FROM crosstab (
>     'SELECT id FROM t as t1',
>     'SELECT id FROM t as t2'
> ) ct (a integer, b integer);

This view is unsafe because it doesn't schema-qualify its reference
to table t.  It will fail if run with a restrictive search_path,
which is what pg_dump does for security reasons.

An ordinary view reference to "t" would be all right, because the
system understands what that is and can adjust the schema qualification;
but here you've just got a string that happens to contain "t" in it.

            regards, tom lane



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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16202: Cannot restore database that has materialized view using crosstab (tablefunc)
Следующее
От: Wagner Engel
Дата:
Сообщение: Re: BUG #16202: Cannot restore database that has materialized viewusing crosstab (tablefunc)