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

From Greg Stark
Subject Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions.
Date
Msg-id CAM-w4HOX7MB8JE0NuLZ-+uPeseij1ZE5+KB_DJ0W5Y2OCNaMXg@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions.  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions.  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-committers

On Sun, Mar 23, 2014 at 1:22 PM, Heikki Linnakangas <hlinnakangas@vmware.com> wrote:
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.

If we're not using the enum type perhaps it would be better to make it a bunch of #defines? The main advantage of enum types is that the debugger knows what values are legal and can decode them for you. 

That said, I guess there's not much reason to go and change things now either. 



--
greg

pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions.
Next
From: Andrew Dunstan
Date:
Subject: pgsql: Introduce jsonb, a structured format for storing json.