Re: Avoid mix char with bool type in comparisons

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Re: Avoid mix char with bool type in comparisons
Дата
Msg-id CAEudQApCoDhuHHNOSvpJyXPgWQGizsXUHDsdMRc8iFfL_kNRKQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Avoid mix char with bool type in comparisons  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Avoid mix char with bool type in comparisons
Список pgsql-hackers
Em qui., 6 de out. de 2022 às 20:52, Tom Lane <tgl@sss.pgh.pa.us> escreveu:
Ranier Vilela <ranier.vf@gmail.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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ajin Cherian
Дата:
Сообщение: Re: Support logical replication of DDLs
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Avoid mix char with bool type in comparisons