Re: BUG #19784: "no relation entry for relid 1" when costing = ANY (<array expr over max(col)>) in a MinMaxAggPath

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Richard Guo <guofenglinux(at)gmail(dot)com>, alpkeles99(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19784: "no relation entry for relid 1" when costing = ANY (<array expr over max(col)>) in a MinMaxAggPath
Date: 2026-10-24 04:04:05
Message-ID: CAGRkXqR3iNffVZqPD-YMbcfHv2Fe8TgDzrungtxYnLKHc7o0EQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Tom

> So even with a fix that prevents examine_variable from failing, it
> seems likely that we are not managing to reduce index expressions the
> same as we will reduce query expressions later.

I think they are ok. The NullTest reduction in c925ad30b only needs the
RTE and array, not the RelOptInfo. And query quals are also folded before
any
RelOptInfo exists.

I think your patch already covered all the cases, so no need to do extra
work.

Thanks,
Shihao

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message BHUVAN CHILUKUTI 2026-10-24 04:34:53 first_value()/nth_value() with IGNORE NULLS loop forever (EXCLUDE GROUP/TIES, frame past partition end, no ORDER BY)
Previous Message Venu K 2026-10-23 19:14:21 Re: BUG #19768: JSON_TABLE: row/text comparisons in context item or PASSING give wrong results or spurious collation