Re: Warnings around booleans
От | Heikki Linnakangas |
---|---|
Тема | Re: Warnings around booleans |
Дата | |
Msg-id | 55CC7F7A.3050203@iki.fi обсуждение исходный текст |
Ответ на | Re: Warnings around booleans (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: Warnings around booleans
|
Список | pgsql-hackers |
On 08/12/2015 03:46 PM, Stephen Frost wrote: > * Andres Freund (andres@anarazel.de) wrote: >> On 2015-08-12 08:16:09 -0400, Stephen Frost wrote: >>>> 1) gin stores/queries some bools as GinTernaryValue. >>>> >>>> Part of this is easy to fix, just adjust GinScanKeyData->entryRes to >>>> be a GinTernaryValue (it's actually is compared against MAYBE). >>>> >>>> What I find slightly worrysome is that in gin_tsquery_consistent() >>>> checkcondition_gin (returning GinTernaryValue) is passed as a >>>> callback that's expected to return bool. And the field >>>> checkcondition_gin is returning (GinChkVal->check[i]) actually is a >>>> ternary. >>> >>> Is there a potential corruption issue from that..? >> >> I honestly don't understand the gin code well enough to answer that. > > Yeah, neither do I, so I've added Heikki. Heikki, any idea as to the > impact of this? It's harmless. gin_tsquery_consistent() places a boolean array as the 'check' array, and therefore checkcondition_gin will also only return TRUEs and FALSEs, never MAYBEs. A comment to explain why that's OK would probably be in order though. - Heikki
В списке pgsql-hackers по дате отправления: