On 6 January 2017 at 08:44, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
>> (1) private/public visibility (as Oracle does with package vars).
>> this point is enough to implement the presented use case.
Agreed.
>> (2) typing (casting is a pain)
We already have typed GUCs and allow them to be user-defined. See
DefineCustomBoolVariable, DefineCustomIntVariable, etc.
What we lack is a way to declare and use typed dynamically
user-defined GUCs at runtime without a C extension.
We also lack user interface to load and store values without going via
their text representation; there's no current_setting_int4 etc.
So if we allow for now the idea that we'd extend the GUC model to do
this (which I'm not at all sure is a good thing) ... it's possible.
>> (5) have some "permanent" GUC type declarations (maybe editing the
>> config file does that already, by the way?)
We have that, but it currently requires a C extension.
-- Craig Ringer http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services