Re: Add notification on BEGIN ATOMIC SQL functions using temp relations
Bernice Southey <bernice.southey@gmail.com>
From: Bernice Southey <bernice.southey@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jim Jones <jim.jones@uni-muenster.de>, "David G. Johnston" <david.g.johnston@gmail.com>,
Pavel Stehule <pavel.stehule@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-22T19:44:19Z
Lists: pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote: >if a temp table is used to > define an old-style function's argument or result type, eg > 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. I briefly did try using my temp table as the result type and was delighted I could, but my client library wasn't. I had no idea I'd accidentally made my functions weirdly temporary, so your notice would have been very useful. Thanks, Bernice