Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions.
| От | Heikki Linnakangas |
|---|---|
| Тема | Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions. |
| Дата | |
| Msg-id | 533919B4.30507@vmware.com обсуждение исходный текст |
| Ответ на | Re: pgsql: Allow opclasses to provide tri-valued GIN consistent functions. (Greg Stark <stark@mit.edu>) |
| Ответы |
Re: pgsql: Allow opclasses to provide tri-valued GIN
consistent functions.
|
| Список | pgsql-committers |
On 03/23/2014 06:07 PM, Greg Stark wrote: > 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. Yeah, I think you're right. Changed it to use #defines, renamed the typedef to GinTernaryValue as that's more descriptive, and added a brief comment mentioning that a GinTernaryValue is compatible with a boolean. - Heikki
В списке pgsql-committers по дате отправления: