Re: BUG #19848: BEGIN ATOMIC with unnamed/OUT params breaks restore and pg_upgrade

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Atisss hh <125atishprak(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, Peter Eisentraut <peter(at)eisentraut(dot)org>
Subject: Re: BUG #19848: BEGIN ATOMIC with unnamed/OUT params breaks restore and pg_upgrade
Date: 2026-11-12 19:56:13
Message-ID: 362806.1794513373@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Atisss hh <125atishprak(at)gmail(dot)com> writes:
> I tested your patch on current master. All the cases from my report now
> create, dump and restore with identical results, and the core regression
> tests (243) and plsample pass. pg_upgrade from a patched build to a patched
> build works. Upgrading from 18.6 still fails with the empty identifier,
> since the old server does the deparsing, so this would also need
> backpatching to 18 to help pg_upgrade from there.

Yeah, it needs back-patching. I did that and pushed it.

> Agreed that the q2 case is a scoping problem and not part of this bug.
> I don't have a better idea than printing $n, since any qualified name
> can be captured by a FROM item with the same name.

I'll wait to see if Peter has a better idea before doing anything
about that part. The problem would only arise with a function name
that matches a table alias in some query within the function;
which is certainly possible but it must not be common, else we'd
have heard about this years ago.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrey Rachitskiy 2026-11-12 20:19:19 Re: BUG #19883: Partition pruning errors on SubPlan inside = ANY array
Previous Message Сергей Шиндерук 2026-11-12 18:18:35 Re: BUG #19894: CREATE DATABASE logs all-zeros visibility map