pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Japin Li <japinli@hotmail.com>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: a.kozhemyakin@postgrespro.ru, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17570: Unrecognized node type for query with statistics on expressions
Date: Fri, 05 Aug 2022 11:08:27 -0400
Message-ID: <3943162.1659712107@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMbWs48FfgCZsA1URKboCHyNjXxDAZR=esFzwfRgqL+8H7+WBg@mail.gmail.com>
References: <17570-f2f2e0f4bccf0965@postgresql.org>
	<CAMbWs4_PPrJ7JFXqewQfkMLP6-2kHi+5=11U0csQVTx7iq7esw@mail.gmail.com>
	<CAMbWs49MoDfQzbcmH4VWisTNVDfCuZcALPOzJxGac2UV5KVi7w@mail.gmail.com>
	<ME3P282MB1667E822B3DEA81E46EEE11CB69F9@ME3P282MB1667.AUSP282.PROD.OUTLOOK.COM>
	<3508845.1659627758@sss.pgh.pa.us>
	<CAMbWs4-g44xwS6KCEmSaoc8jqcTd1n8tt8u10=hChFTEyRJQbA@mail.gmail.com>
	<CAMbWs48FfgCZsA1URKboCHyNjXxDAZR=esFzwfRgqL+8H7+WBg@mail.gmail.com>

Richard Guo <guofenglinux@gmail.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





view thread (10+ messages)

Message-ID: <3943162.1659712107@sss.pgh.pa.us>
Permalink:  ../3943162.1659712107@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3943162.1659712107@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, guofenglinux@gmail.com, japinli@hotmail.com, tomas.vondra@enterprisedb.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17570: Unrecognized node type for query with statistics on expressions
  In-Reply-To: <3943162.1659712107@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox