Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions. - Mailing list pgsql-committers

From Andrew Dunstan
Subject Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions.
Date
Msg-id 532EEB64.40408@dunslane.net
Whole thread Raw
In response to Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions.  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-committers
On 03/23/2014 09:22 AM, Heikki Linnakangas wrote:
>
> Here's the code from gin.h (after fixing the issues Andres and Tom
> pointed out):
>
>> enum GinLogicValueEnum
>> {
>>         GIN_FALSE = 0,                  /* item is not present / does
>> not match */
>>         GIN_TRUE = 1,                   /* item is present / matches */
>>         GIN_MAYBE = 2                   /* don't know if item is
>> present / don't know if
>>                                                          * matches */
>> };
>>
>> typedef char GinLogicValue;
>
> The reason for the typedef is precisely that an enum is not guaranteed
> to be one byte. Tom suggested getting rid of the typedef, but it's
> needed to make sure it's stored as one byte.
>
> I'll go add a comment to it, explaining why it's needed.
>
>

Ak, OK, I probably misread your previous email.

cheers

andrew



pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions.
Next
From: Greg Stark
Date:
Subject: Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions.