Re: patch: shared session variables - Mailing list pgsql-hackers

From Tom Lane
Subject Re: patch: shared session variables
Date
Msg-id 28284.1346355540@sss.pgh.pa.us
Whole thread Raw
In response to Re: patch: shared session variables  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Aug 30, 2012 at 2:18 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>> 2012/8/30 Robert Haas <robertmhaas@gmail.com>:
>>> On Tue, Aug 14, 2012 at 3:46 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>>>> patch that implements "shared" client/server session variables

>>> I don't really see what we can do with this that we can't do without this.

>> a motivation for this patch was discussion about parametrised DO
>> statement - and simple possibility of access to host variables (psql)
>> variables from server - PL scripts.
>> 
>> It is based on Tom's and Magnus's ideas - it is secure, because only
>> variables explicitly mentioned in shared namespace are "shared".

> Sure, but you could get to the same place by issuing a SET command for
> just the particular variable you want to use with DO.  You don't
> really need a magic facility for it.

FWIW, I don't particularly care for this idea either.  It may be less
klugy than the original proposal, but it's still a kluge.  Also, it's
not very sensible to consider extensions of this sort unless we have
ambitions of turning psql into a full-fledged scripting language,
with conditionals and iteration at the very least.  I do not want
to go there.  If you need scripting capability, there are lots of
better tools out there already.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: How to form a self-defined TupleTableSlot
Next
From: "Tomas Vondra"
Date:
Subject: Re: PATCH: pgbench - random sampling of transaction written into log