Re: BUG #17570: Unrecognized node type for query with statistics on expressions - Mailing list pgsql-bugs

From Richard Guo
Subject Re: BUG #17570: Unrecognized node type for query with statistics on expressions
Date
Msg-id CAMbWs4-g44xwS6KCEmSaoc8jqcTd1n8tt8u10=hChFTEyRJQbA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17570: Unrecognized node type for query with statistics on expressions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #17570: Unrecognized node type for query with statistics on expressions
List pgsql-bugs

On Thu, Aug 4, 2022 at 11:42 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
* statext_is_compatible_clause_internal is not on board with
offsetting the attnums.
 
Correct. Good catch! Fix this in v2 patch.
 
* Neither is this check for a whole-row reference (line 1628, in HEAD):

                if (bms_is_member(InvalidAttrNumber, clause_attnums))

Actually this has been fixed in my v1 patch [1].
 
* Although the coverage report claims this code is exercised, the
fact that nothing failed when you made only a partial fix says it's
not exercised well enough.
 
That's true. We need to provide a better test case to cover this.
 

* The comments for statext_is_compatible_clause suck.  If they'd
defined what the arguments are, perhaps this mess would have been
prevented.  For extra credit, it'd be really nice to define what
"is compatible" means.  I'd sure not have thought that that would
include permissions checks.

Concur with that.


Thanks
Richard 
Attachment

pgsql-bugs by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Excessive number of replication slots for 12->14 logical replication
Next
From: Richard Guo
Date:
Subject: Re: BUG #17570: Unrecognized node type for query with statistics on expressions