From: Tom Lane <tgl@sss.pgh.pa.us>
To: bernice.southey@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19072: New-style SQL language function referencing a temp table behaves oddly
Date: Sat, 04 Oct 2025 13:26:00 -0400
Message-ID: <1526598.1759598760@sss.pgh.pa.us> (raw)
In-Reply-To: <19072-819bab455efebdd7@postgresql.org>
References: <19072-819bab455efebdd7@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> When created in psql, a new-style SQL language function referencing a temp
> table disappears with the session, as if it were a temporary function.
Yeah, this is expected, since the parser will create a pg_depend
linkage from the function to the temp table.
> When created in pgAdmin, the function survives.
Really? I don't use pgAdmin, but I don't see how it could affect the
object dependency rules. Perhaps it's not closing the originating
session when you think it is?
There is a nearby thread proposing forbidding new-style functions
from having dependencies on temp objects [1]. Curious to know if
you think that'd be a good answer.
regards, tom lane
[1] https://www.postgresql.org/message-id/flat/19cf6ae1-04cd-422c-a760-d7e75fe6cba9%40uni-muenster.de
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, bernice.southey@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19072: New-style SQL language function referencing a temp table behaves oddly
In-Reply-To: <1526598.1759598760@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox