From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net>, Andres Freund <andres(at)anarazel(dot)de> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Warnings around booleans |
Date: | 2015-08-13 11:28:58 |
Message-ID: | 55CC7F7A.3050203@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 08/12/2015 03:46 PM, Stephen Frost wrote:
> * Andres Freund (andres(at)anarazel(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-08-13 11:29:17 | Re: Warnings around booleans |
Previous Message | Michael Meskes | 2015-08-13 11:27:33 | Re: Warnings around booleans |