Re: [PATCH][PROPOSAL] Add enum releation option type

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>
Cc: Nikolay Shaplov <dhyan(at)nataraj(dot)su>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH][PROPOSAL] Add enum releation option type
Date: 2018-03-01 17:47:35
Message-ID: 20180301174735.yyu6i5y66u3xp3jc@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-03-01 17:53:40 Re: 2018-03 Commitfest Summary (Andres #1)
Previous Message Fabien COELHO 2018-03-01 17:47:04 Re: pgbench - add \if support