On Thu, Oct 1, 2026 at 11:23 AM Adrian Klaver <[email protected]>
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.

Reply via email to