Thread

  1. Re: Add notification on BEGIN ATOMIC SQL functions using temp relations

    Bernice Southey <bernice.southey@gmail.com> — 2025-11-22T19:44:19Z

    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