| From: | "Florian G(dot) Pflug" <fgp(at)phlo(dot)org> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Per-function GUC settings: trickier than it looked |
| Date: | 2007-09-03 17:33:22 |
| Message-ID: | 46DC4562.3080600@phlo.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane wrote:
> "Florian G. Pflug" <fgp(at)phlo(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kenneth Marshall | 2007-09-03 17:36:42 | Re: Hash index todo list item |
| Previous Message | Decibel! | 2007-09-03 17:18:58 | Code examples |