Re: BUG #19632: RULE rewriting crashes with XX000 when RETURNING old/new references a system column

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Cc: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>, hackerzheng666(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19632: RULE rewriting crashes with XX000 when RETURNING old/new references a system column
Date: 2026-08-20 22:53:14
Message-ID: aoeFWookuVmnletx@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Aug 20, 2026 at 09:29:36AM +0100, Zsolt Parragi wrote:
> Right, I thought you can't implement soft delete with triggers but of
> course you can. Except that RETURNING doesn't work at all in that
> case, unless I make it a delete+insert or also introduce a helper
> view, but even with the view I can only get out the old xmin, not the
> new.

For now I have applied your patch on HEAD as of d39762b8c79a,
qualifying as a life improvement thing with a better message. I have
never really seen somebody complain about that limitation, as well..
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tender Wang 2026-08-21 01:54:23 Re: BUG #19633: Unexpected results of IN (subquery) with a non-deterministic collation
Previous Message Michael Paquier 2026-08-20 22:30:53 Re: BUG #19629: pg_restore_relation_stats reports XX000 instead of proper SQLSTATE for input validation errors