Re: BUG #19435: Error: "No relation entry for relid 2" Triggered by Complex Join with Self-Referencing Tables - Mailing list pgsql-bugs

From Tender Wang
Subject Re: BUG #19435: Error: "No relation entry for relid 2" Triggered by Complex Join with Self-Referencing Tables
Date
Msg-id CAHewXN=Oz1ACoGsUcSE5B2udK3bmfqHv4CsPKdvr4AbBRRMeCA@mail.gmail.com
Whole thread
In response to Re: BUG #19435: Error: "No relation entry for relid 2" Triggered by Complex Join with Self-Referencing Tables  (Alexander Korotkov <aekorotkov@gmail.com>)
List pgsql-bugs
Alexander Korotkov <aekorotkov@gmail.com> 于2026年4月22日周三 23:10写道:
>
> I have another approach about to deduplication of RestrictInfo's.  The
> field, which differs in this case, is outer_relids.  AFAICS,
> outer_relids and incompatible_relids serves as the restriction on what
> we can do with RestrictInfo.  So, what we can do is to ignore both
> outer_relids and incompatible_relids during comparison, but compose a
> union of their values for remaining RestrictInfo.  That means that
> remaining RestrictInfo will ancest all the restrictions, and that
> should be safe.
>
> What do you think?

It seems workable and safer than the previous solution.



--
Thanks,
Tender Wang



pgsql-bugs by date:

Previous
From: Ayush Tiwari
Date:
Subject: Re: to_date()/to_timestamp() silently accept month=0 and day=0
Next
From: Andrey Borodin
Date:
Subject: Re: Potential buffer overrun in spell.c's CheckAffix()