Re: [HACKERS] proposal: session server side variables

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: [HACKERS] proposal: session server side variables
Дата
Msg-id CAFj8pRCTwEh4GO4HvFA9d8CmBBuoVzq0v3utqB+Ust1NZgV4cw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] proposal: session server side variables  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: [HACKERS] proposal: session server side variables  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers


Um, what? No, not at all.

GUCs are scoped, but not transactional, [...]

The documentation is very scarse, so I have tested it.

All tests I have done with commit & rollback on session variables (SET SESSION) have shown a clean transactional behavior, with the value reverted on ROLLBACK, whether intentional or automatic, or the new value set on COMMIT. See attached scripts for instance.

Your test shows so SET SESSION has not transactional behaviour - the transactions fails, but the value is not reverted to NULL.

It is good example of antipattern for this routine type :)

Pavel

 


Fabien.

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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: [HACKERS] proposal: session server side variables
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: [HACKERS] proposal: session server side variables