Re: Avoid mix char with bool type in comparisons - Mailing list pgsql-hackers

From Ranier Vilela
Subject Re: Avoid mix char with bool type in comparisons
Date
Msg-id CAEudQArAKDpCth4dv2+ykSaiNGpusDZru3Xoza2UG2H2KT8Tuw@mail.gmail.com
Whole thread Raw
In response to Re: Avoid mix char with bool type in comparisons  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Avoid mix char with bool type in comparisons
List pgsql-hackers
Em qui., 6 de out. de 2022 às 21:21, Tom Lane <tgl@sss.pgh.pa.us> escreveu:
Ranier Vilela <ranier.vf@gmail.com> writes:
> My main concerns is this point:
>   /* If already matched on earlier page, do no extra work */
> - if (key->entryRes[j])
> + if (key->entryRes[j] == GIN_TRUE)
>   continue;

> If GIN_MAYBE cases are erroneously ignored.

So, if that's a bug, you should be able to produce a test case?
No Tom, unfortunately I don't have the knowledge to create a test with GIN_MAYBE values.

With the patch, all current tests pass.
Either there are no bugs, or there are no tests that detect this specific case.
And I agree with you, without a test showing the bug,
there's not much chance of the patch progressing.

Unless someone with more knowledge can say that the patch improves robustness.

regards,
Ranie Vilela

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Issue with pg_stat_subscription_stats
Next
From: David Rowley
Date:
Subject: Re: Reducing the chunk header sizes on all memory context types