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

From: Nikolay Shaplov <dhyan(at)nataraj(dot)su>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH][PROPOSAL] Add enum releation option type
Date: 2019-07-03 09:10:08
Message-ID: 15941756.bfKRYTai5T@x200m
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

В письме от понедельник, 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
> + { (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

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.",;

It is not that nice as before, but quite acceptable, as I see it.

You do not see it that way?

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Adrien Nayrat 2019-07-03 09:39:36 Re: [PATCH] Speedup truncates of relation forks
Previous Message Nikolay Shaplov 2019-07-03 09:04:32 Re: [PATCH][PROPOSAL] Add enum releation option type