On 08/12/2015 03:46 PM, Stephen Frost wrote:
* Andres Freund (and...@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



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to