From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions. |
Date: | 2014-03-23 14:10:44 |
Message-ID: | 532EEB64.40408@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2014-03-23 16:07:54 | Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions. |
Previous Message | Heikki Linnakangas | 2014-03-23 13:22:45 | Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions. |