From: Nikolay Shaplov <dhyan@nataraj.su>
To: pgsql-hackers@lists.postgresql.org
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH][PROPOSAL] Add enum releation option type
Date: Wed, 03 Jul 2019 12:10:08 +0300
Message-ID: <15941756.bfKRYTai5T@x200m> (raw)
In-Reply-To: <20190701180628.GA17184@alvherre.pgsql>
References: <20190701180628.GA17184@alvherre.pgsql>
В письме от понедельник, 1 июля 2019 г. 14:06:28 MSK пользователь Alvaro
Herrera написал:
> It strikes me that the way to avoid sentence construction is to have
> each enum reloption declare a string that it uses to list the values it
> accepts. So for example we would have
>
> +#define GIST_OPTION_BUFFERING_ENUM_DEF { \
> + { "on", GIST_OPTION_BUFFERING_ON }, \
> + { "off", GIST_OPTION_BUFFERING_OFF }, \
> + { "auto", GIST_OPTION_BUFFERING_AUTO }, \
> + { (const char *) NULL, 0 } \
> +}
> +
> + GistBufferingValidMsg = gettext_noop("Valid values are \"on\", \"off\",
> and \"auto\".");
>
> I think that's the most contentious point on this patch at this point
> (though I may be misremembering).
I actually removed "and" from the list and let it be simple coma separated
list
ERROR: invalid value for "check_option" option
DETAIL: Valid values are: "local", "cascaded".
Now we can translate left part, and subst list to the right part
errdetail("Valid values are: %s.", buf.data)));
It is not that nice as before, but quite acceptable, as I see it.
You do not see it that way?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: dhyan@nataraj.su, pgsql-hackers@lists.postgresql.org, alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, n.gluhov@postgrespro.ru
Subject: Re: [PATCH][PROPOSAL] Add enum releation option type
In-Reply-To: <15941756.bfKRYTai5T@x200m>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox