Re: Per-function GUC settings: trickier than it looked

Поиск
Список
Период
Сортировка
От Decibel!
Тема Re: Per-function GUC settings: trickier than it looked
Дата
Msg-id 20070903090953.GT38801@decibel.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
On Sun, Sep 02, 2007 at 12:08:00PM -0400, Tom Lane wrote:
> I notice BTW that we have never updated the SET reference page since
> subtransactions were introduced --- it still says only that SET LOCAL
> is "local to the current transaction", without a word about
> subtransactions.  So we have a documentation problem anyway.  I recall
> that we had some discussion during the 8.0 dev cycle about whether
> having SET LOCAL's effects end at the end of the current subtransaction
> was really a good idea, given that subtransactions aren't the conceptual
> model the SQL spec defines, but nothing was ever done about changing
> the implementation.

ISTM that's the real problem; SET LOCAL wasn't fully updated/considered
when subtransactions were added.

One way to handle this would be to have 3 different behaviors for SET:
session-level, transaction-level, and sub-transaction level. If we had
that, we could probably make an across-the-board call that all functions
operate as if in their own sub-transaction, at least when it comes to
SET.

Whatever we decide on, least-surprise would dictate that it's the
same whether you apply function-specific settings or not.
--
Decibel!, aka Jim Nasby                        decibel@decibel.org
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: integrated tsearch has different results than tsearch2
Следующее
От: Decibel!
Дата:
Сообщение: Re: [pgsql-www] \dF wrt text search