Re: Clean up remove_rel_from_query() after self-join elimination commit - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Clean up remove_rel_from_query() after self-join elimination commit
Date
Msg-id CAMbWs48RYf3dDS4P+HC43x-KLrN0uF-aU-Mk0Ld5JoWGErOqUg@mail.gmail.com
Whole thread
In response to Re: Clean up remove_rel_from_query() after self-join elimination commit  (wenhui qiu <qiuwenhuifx@gmail.com>)
List pgsql-hackers
On Tue, Apr 7, 2026 at 6:57 PM wenhui qiu <qiuwenhuifx@gmail.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



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: [PATCH] Add tests for Bitmapset
Next
From: Andrey Borodin
Date:
Subject: Re: code contributions for 2025, WIP version