Re: BUG #17570: Unrecognized node type for query with statistics on expressions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: Japin Li <japinli(at)hotmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, a(dot)kozhemyakin(at)postgrespro(dot)ru, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17570: Unrecognized node type for query with statistics on expressions
Date: 2022-08-05 15:08:27
Message-ID: 3943162.1659712107@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> I realized the fix in v2 is not correct. The attnums generated by
> statext_is_compatible_clause is expected to be NOT offsetting by its
> caller, i.e. statext_mcv_clauselist_selectivity. Revise that in v3 patch
> by doing the offsetting when composing clause_attnums that need to have
> permission check.

Yeah, I was afraid that that route would require the patch to metastasize
into more places. Agreed on keeping the argument definition the same
and coping locally instead. But I don't think that you've done enough
to address the root cause of this bug, which is the woeful
under-documentation of the argument. I'll have a go at that part.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2022-08-05 16:05:49 Re: [External] Re: [PATCH] BUG FIX: inconsistent page found in BRIN_REGULAR_PAGE
Previous Message Tom Lane 2022-08-05 14:23:39 Re: BUG #17575: row(NULL) IS NULL inconsistent with IS NOT DISTINCT FROM NULL