[GENERAL] Why is materialized view creation a "security-restricted operation"?

Поиск
Список
Период
Сортировка
От Joshua Chamberlain
Тема [GENERAL] Why is materialized view creation a "security-restricted operation"?
Дата
Msg-id CAFBoRzf6HwFg1jovdOrbtC6x4xKV__-t5EjSzbY2068S01pcTg@mail.gmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] Why is materialized view creation a"security-restricted operation"?
Список pgsql-general
Hello,

I see this has been discussed briefly before[1], but I'm still not clear on what's happening and why.

I wrote a function that uses temporary tables in generating a result set. I can use it when creating tables or views, e.g.,
CREATE TABLE some_table AS SELECT * FROM my_func();
CREATE VIEW some_view AS SELECT * FROM my_func();

But creating a materialized view fails:
CREATE MATERIALIZED VIEW some_view AS SELECT * FROM my_func();
ERROR:  cannot create temporary table within security-restricted operation

The docs explain that this is expected[2], but not why. On the contrary, this is actually quite surprising to me, given that tables and views work just fine. What makes a materialized view so different? Are there any plans to make this more consistent?

Thanks for any help you can provide.

Regards,
Joshua Chamberlain

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

Предыдущее
От: Jerry Sievers
Дата:
Сообщение: Re: [GENERAL] pg_dump Conflict with recovery
Следующее
От: Israel Brewster
Дата:
Сообщение: Re: [GENERAL] pg_dump Conflict with recovery