Re: [PATCH][PROPOSAL] Add enum releation option type - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [PATCH][PROPOSAL] Add enum releation option type
Date
Msg-id 20180301174735.yyu6i5y66u3xp3jc@alvherre.pgsql
Whole thread Raw
In response to Re: [PATCH][PROPOSAL] Add enum releation option type  (Nikita Glukhov <n.gluhov@postgrespro.ru>)
Responses Re: [PATCH][PROPOSAL] Add enum releation option type  (Nikolay Shaplov <dhyan@nataraj.su>)
List pgsql-hackers
Nikita Glukhov wrote:

> I have refactored patch by introducing new struct relop_enum_element to make it
> possible to use existing C-enum values in option's definition.  So, additional
> enum GIST_OPTION_BUFFERING_XXX was removed.
> 
> Also default option value should be placed now in the first element of
> allowed_values[].  This helps not to expose default values definitions (like
> GIST_BUFFERING_AUTO defined in gistbuild.c).

Cool, yeah this is more in line with what I was thinking.

The "int enum_val" in relopt_value makes me a little nervous.  Would it
work to use a relopt_enum_element pointer instead?

I see you lost the Oxford comma:

-DETAIL:  Valid values are "on", "off", and "auto".
+DETAIL:  Valid values are "auto", "on" and "off".

Please put these back.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: pgbench - add \if support
Next
From: Andres Freund
Date:
Subject: Re: 2018-03 Commitfest Summary (Andres #1)