Re: Per-function GUC settings: trickier than it looked
От | Florian G. Pflug |
---|---|
Тема | Re: Per-function GUC settings: trickier than it looked |
Дата | |
Msg-id | 46DC4562.3080600@phlo.org обсуждение исходный текст |
Ответ на | Re: Per-function GUC settings: trickier than it looked (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Per-function GUC settings: trickier than it looked
|
Список | 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 по дате отправления: