Re: Per-function GUC settings: trickier than it looked - Mailing list pgsql-hackers

From Florian G. Pflug
Subject Re: Per-function GUC settings: trickier than it looked
Date
Msg-id 46DC4562.3080600@phlo.org
Whole thread Raw
In response to Re: Per-function GUC settings: trickier than it looked  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Per-function GUC settings: trickier than it looked
List pgsql-hackers
Tom Lane wrote:
> "Florian G. Pflug" <fgp@phlo.org> writes:
>> At least for me, the least surprising behaviour would be to
>> revert it too. Than the rule becomes "a function is always
>> executed in a pseudo-subtransaction that affects only GUCs"
> 
> Only if it has at least one SET clause.  The overhead is too high
> to insist on this for every function call.

In that case, I agree that only variables specified in a SET-clause
should be reverted. Otherwise, adding or removing
SET-clauses (e.g, because you chose a different implementation
of a function that suddenly doesn't need regexps anymore) will
cause quite arbitrary behavior changes.

And the rule becomes (I tend to forget things, so I like simple
rules that I can remember ;-) ) "For each SET-clause, there is
a pseudo-subtransaction affecting only *this* GUC".

greetings, Florian Pflug




pgsql-hackers by date:

Previous
From: Decibel!
Date:
Subject: Code examples
Next
From: Kenneth Marshall
Date:
Subject: Re: Hash index todo list item