pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Remove faulty Asserts added by 1999fe227.
3+ messages / 1 participants
[nested] [flat]

* pgsql: Remove faulty Asserts added by 1999fe227.
@ 2026-10-23 14:29 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2026-10-23 14:29 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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.slg01@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Discussion: https://postgr.es/m/CAJTYsWWsORQbyViXmsvT4-NWkjuykkjjk2c+gQtq+vw2PJON-A@mail.gmail.com
Backpatch-through: 18

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/896246ea10cb9d20f69d0442223ce5fa9b365636

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Remove faulty Asserts added by 1999fe227.
@ 2026-10-23 14:29 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2026-10-23 14:29 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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.slg01@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.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(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Remove faulty Asserts added by 1999fe227.
@ 2026-10-23 14:29 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2026-10-23 14:29 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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.slg01@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Discussion: https://postgr.es/m/CAJTYsWWsORQbyViXmsvT4-NWkjuykkjjk2c+gQtq+vw2PJON-A@mail.gmail.com
Backpatch-through: 18

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b049b4e7b4a159d373ef394bda67f7cf25758998

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2026-10-23 14:29 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-23 14:29 pgsql: Remove faulty Asserts added by 1999fe227. Tom Lane <tgl@sss.pgh.pa.us>
2026-10-23 14:29 pgsql: Remove faulty Asserts added by 1999fe227. Tom Lane <tgl@sss.pgh.pa.us>
2026-10-23 14:29 pgsql: Remove faulty Asserts added by 1999fe227. Tom Lane <tgl@sss.pgh.pa.us>

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