pgsql: Remove faulty Asserts added by 1999fe227.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove faulty Asserts added by 1999fe227.
Date: 2026-10-23 14:29:55
Message-ID: E1xKGHL-00000000SgU-3Mme@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove faulty Asserts added by 1999fe227.

I added these assertions in an attempt to show that setting
ret_old_alias/ret_new_alias in set_deparse_plan() fully covered
all the parts of the plan where RETURNING Vars could be found.
But it emerges that the returningOldAlias/returningNewAlias
fields they are filled from can sometimes be NULL themselves,
allowing the asserts to fail. We discussed various ways that
we might adjust the rewriter to prevent that, but the upshot
of the discussion was just to remove the asserts again.

Reported-by: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Reviewed-by: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAJTYsWWsORQbyViXmsvT4-NWkjuykkjjk2c+gQtq+vw2PJON-A@mail.gmail.com
Backpatch-through: 18

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/015f4c9fc35f91a1ab46bafab05a3686cfe09d46

Modified Files
--------------
src/backend/utils/adt/ruleutils.c | 6 ------
1 file changed, 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2026-10-23 15:35:47 pgsql: Emit null-keyed hash join outer tuples immediately when feasible
Previous Message Michael Paquier 2026-10-23 07:24:13 pgsql: Fix handling of some SQL/JSON locations in query jumbling