Re: Clean up remove_rel_from_query() after self-join elimination commit

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: wenhui qiu <qiuwenhuifx(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Clean up remove_rel_from_query() after self-join elimination commit
Date: 2026-04-18 10:17:20
Message-ID: CAMbWs48RYf3dDS4P+HC43x-KLrN0uF-aU-Mk0Ld5JoWGErOqUg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 7, 2026 at 6:57 PM wenhui qiu <qiuwenhuifx(at)gmail(dot)com> wrote:
> Assert(!is_outer_join || joinrelids != NULL);

Worth asserting. If a caller sets sjinfo but passes NULL for
joinrelids, this would silently over-delete PHVs.

> Assert(!is_self_join || joinrelids == NULL);

I prefer to not add this one. It's not defending any invariant.

- Richard

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2026-04-18 11:13:19 Re: code contributions for 2025, WIP version
Previous Message David Rowley 2026-04-18 09:06:02 Re: [PATCH] Add tests for Bitmapset