Re: proposal: session server side variables

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Joe Conway <mail(at)joeconway(dot)com>
Subject: Re: proposal: session server side variables
Date: 2017-01-06 04:14:34
Message-ID: CAMsr+YHa4F7_90nQaf5BmB9wNkZVCSjQfK+-uJZaVpQ3PXK+YA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 6 January 2017 at 08:44, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2017-01-06 04:22:51 Re: logical decoding of two-phase transactions
Previous Message Craig Ringer 2017-01-06 04:07:39 Re: Logical decoding on standby