| From: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Avoid mix char with bool type in comparisons |
| Date: | 2022-10-07 00:15:37 |
| Message-ID: | CAEudQApCoDhuHHNOSvpJyXPgWQGizsXUHDsdMRc8iFfL_kNRKQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Em qui., 6 de out. de 2022 às 20:52, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> escreveu:
> Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> writes:
> > So, any use of this GinTernaryValue are:
>
> > 1. if (key->entryRes[j]) be FALSE if GIN_FALSE
> > 2. if (key->entryRes[j]) be TRUE if GIN_TRUE
> > 3. if (key->entryRes[j]) be TRUE if GIN_MAYBE
>
> Yeah, that's how it's designed. Unless you can point to a bug,
> I do not think we ought to change this code.
>
Thanks for answering.
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.
regards,
Ranier Vilela
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2022-10-07 00:21:23 | Re: Avoid mix char with bool type in comparisons |
| Previous Message | Ajin Cherian | 2022-10-07 00:01:31 | Re: Support logical replication of DDLs |