| From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>, assam258(at)gmail(dot)com, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [DEPARSE] EXPLAIN prints another ModifyTable's RETURNING aliases in a SubPlan |
| Date: | 2026-10-21 15:57:48 |
| Message-ID: | CAEZATCWC7nUb6XX8e2BmQsQhxunXtAbbQNxQA1xS54AXg2zpKg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, 21 Oct 2026 at 15:46, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-10-21 16:17:46 | Re: [DEPARSE] EXPLAIN prints another ModifyTable's RETURNING aliases in a SubPlan |
| Previous Message | Greg Burd | 2026-10-21 15:45:11 | Re: Let an ordering index scan hand its ORDER BY value to the target list |