Re: [DEPARSE] An alias named 'set' on an UPDATE, DELETE or MERGE target does not read back

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: assam258(at)gmail(dot)com
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [DEPARSE] An alias named 'set' on an UPDATE, DELETE or MERGE target does not read back
Date: 2026-10-18 15:49:08
Message-ID: 249856.1792338548@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Henson Choi <assam258(at)gmail(dot)com> writes:
> When the target of an UPDATE, DELETE or MERGE in a rule or in a
> BEGIN ATOMIC function body has the alias "set", ruleutils.c prints
> the alias bare, and the text no longer parses. The two attached
> patches add tests and fix it.

Another good catch, but here again I find your solution
overcomplicated and perhaps not very future-proof. Let's just
emit AS all the time in these statements.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Manu 2026-10-18 16:45:31 Re: BUG #19686: Rolling back SET TABLESPACE
Previous Message Tom Lane 2026-10-18 15:45:56 Re: [DEPARSE] Pretty-printed sublink test expressions lose needed parentheses