On Wed, 21 Oct 2026 at 15:46, Tom Lane <[email protected]> wrote:
>
> Ayush Tiwari <[email protected]> writes:
> > While looking at 1999fe227df, I noticed that the new Assert(refname)
> > in get_variable() can be hit through a rule (v v edge case, fuzz testing):
>
> Ah, I wondered if those Asserts were too aggressive.
>
> > The attached patch just keeps the rule's alias in that case, and
> > EXPLAIN then shows "Output: n.a".  Thoughts?
>
> We could just drop the Asserts and thereby return to the previous
> behavior.  But perhaps your proposal is better.  Dean, any thoughts?

I think just dropping the Asserts is the better solution, because
showing "Output: n.a" in the EXPLAIN output is likely to lead to
confusion, since there was no relation with alias "n" in the
triggering query, and "n" isn't mentioned anywhere else in the EXPLAIN
output. The user would have to lookup the rule definition to figure
out what "n" means.

Regards,
Dean


Reply via email to