Re: Remove redundant NULL check in clause_selectivity_ext() function

2024-09-22 Thread David Rowley
On Tue, 20 Aug 2024 at 03:48, Ilia Evdokimov wrote: > Let's assume that this check needs to remain, and the length check doesn't > guarantee anything. However, I'm a bit concerned that there's a NULL check > here, but it's missing in the clauselist_selectivity_ext() function. For the > reasons

Re: Remove redundant NULL check in clause_selectivity_ext() function

2024-08-19 Thread Ilia Evdokimov
On 19.8.24 18:02, Tom Lane wrote: Ilia Evdokimov writes: In the `clause_selectivity_ext()` function, there’s a comment regarding a NULL clause check that asks, "can this still happen?". I decided to investigate whether this scenario is still valid. Here’s what I found after reviewing the relev

Re: Remove redundant NULL check in clause_selectivity_ext() function

2024-08-19 Thread Tom Lane
Ilia Evdokimov writes: > In the `clause_selectivity_ext()` function, there’s a comment regarding > a NULL clause check that asks, "can this still happen?". I decided to > investigate whether this scenario is still valid. > Here’s what I found after reviewing the relevant cases: > - approx_tupl

Remove redundant NULL check in clause_selectivity_ext() function

2024-08-19 Thread Ilia Evdokimov
Hi everyone, In the `clause_selectivity_ext()` function, there’s a comment regarding a NULL clause check that asks, "can this still happen?". I decided to investigate whether this scenario is still valid. Here’s what I found after reviewing the relevant cases: - approx_tuple_count(): The fu