Re: Clarification on materialized view restriction needed

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: Clarification on materialized view restriction needed
Дата
Msg-id 20130828044257.GA38772@tornado.leadboat.com
обсуждение исходный текст
Ответ на Clarification on materialized view restriction needed  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Ответы Re: Clarification on materialized view restriction needed
Список pgsql-hackers
On Tue, Aug 27, 2013 at 01:57:49PM +0530, Ashutosh Bapat wrote:
> I want to create a materialized view as the output of a plpgsql function
> returning a set of rows. But that function creates temporary tables and
> thus can not be used for creating materialized view as per the
> documentation at
> http://www.postgresql.org/docs/9.3/static/sql-creatematerializedview.html.
> "This query will run within a security-restricted operation; in particular,
> calls to functions that themselves create temporary tables will fail."
> 
> I tried to understand what is "security-restricted operation", and didn't
> find any definition of this term or any listing as to "these are
> security-restricted operations ...". I am wondering what are other
> restrictions on the queries whose results can be used to create
> materialized views.

The semantics of a security-restricted operation remain undocumented.  You can
witness the list of restrictions by searching for callers of
InSecurityRestrictedOperation().  Here is the current list for core code:

- CREATE TEMP TABLE
- SET ROLE
- SET SESSION AUTHORIZATION
- CLOSE
- PREPARE
- DEALLOCATE
- LISTEN
- UNLISTEN
- DISCARD

-- 
Noah Misch
EnterpriseDB                                 http://www.enterprisedb.com



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

Предыдущее
От: Darren Duncan
Дата:
Сообщение: Re: Deprecating RULES
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Support for REINDEX CONCURRENTLY