Re: Add notification on BEGIN ATOMIC SQL functions using temp relations - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Add notification on BEGIN ATOMIC SQL functions using temp relations
Date
Msg-id 2664207.1763834661@sss.pgh.pa.us
Whole thread Raw
In response to Re: Add notification on BEGIN ATOMIC SQL functions using temp relations  (Bernice Southey <bernice.southey@gmail.com>)
Responses Re: Add notification on BEGIN ATOMIC SQL functions using temp relations
Re: Add notification on BEGIN ATOMIC SQL functions using temp relations
List pgsql-hackers
Bernice Southey <bernice.southey@gmail.com> writes:
> Yikes. Can I get in early on the push-back? I think what you're saying
> is you want to stop old-style SQL functions from using temp tables
> that exist outside of them?

No, that's not part of the proposal.  The one case in which we'd
complain (at an error level TBD) is if a temp table is used to
define an old-style function's argument or result type, eg

    create temp table mytable (id int, data text);

    create function get_mytable() returns setof mytable as ...

This is problematic because the function will go away when mytable
does, no matter how its body is expressed.  That's always been so,
at least since we invented dependencies.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Sami Imseih
Date:
Subject: Re: another autovacuum scheduling thread
Next
From: Bernice Southey
Date:
Subject: Re: Add notification on BEGIN ATOMIC SQL functions using temp relations