Re: [HACKERS] proposal: session server side variables

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: [HACKERS] proposal: session server side variables
Дата
Msg-id CAMsr+YGigrp9H3ari_Q55c4XAVRVYv7orkP+XQLNEhdWaRHRxQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] proposal: session server side variables  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On 5 January 2017 at 01:49, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
>
>> ok understand
>
>
> Good. So we seem to agree that GUCS are transactional?

No. We don't agree. They aren't.

The effects of SET LOCAL are reverted whether you commit or rollback.

The effects of SET SESSION are never reverted, whether you commit or roll back.

craig=> SET x.s = 'x';
SET
craig=> BEGIN;
BEGIN
craig=> SET LOCAL x.s = 'y';
SET
craig=> COMMIT;
COMMIT
craig=> SHOW x.s;x.s
-----x
(1 row)

There are simply different scopes, one of which is the transaction scope.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Vitaly Burovoy
Дата:
Сообщение: Re: [HACKERS] identity columns
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: [HACKERS] proposal: session server side variables