Re: Why is materialized view creation a "security-restricted operation"?

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why is materialized view creation a "security-restricted operation"?
Date: 2026-10-01 23:55:52
Message-ID: CANzqJaCa34mEGBsTKZZQz7ZwDR3jd+Q0=s2_7ayw2hHFwTMXjw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Oct 1, 2026 at 11:23 AM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 10/1/26 6:11 AM, Färber, Franz-Josef (StMUK) wrote:
> > * The next best thing would be a temp table, local/unique in the sense
> as above, that gets destroyed when leaving the function.
>
> ?:
> BEGIN;
>
> CREATE TEMP TABLE some_table ...
>
> CREATE MATERIALIZED VIEW some_view AS SELECT * FROM my_func();
> --Where function uses the table.
>

A GLOBAL TEMP table (where the DBA runs the CREATE GLOBAL TEMP TABLE once
(so that CREATE TEMP TABLE some_table everywhere that my_func() is
called) would also solve OP's problem.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2026-10-02 00:03:17 Re: SQL_NEED__DATA
Previous Message Igor Korot 2026-10-01 23:39:38 Fwd: SQL_NEED__DATA