Re: [HACKERS] proposal: session server side variables

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: [HACKERS] proposal: session server side variables
Дата
Msg-id alpine.DEB.2.20.1701041423240.22281@lancre
обсуждение исходный текст
Ответ на Re: [HACKERS] proposal: session server side variables  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: [HACKERS] proposal: session server side variables  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
> An alternative is to implement sub (nested) transactions, like Oracle 
> and MS SQL Server... but that would be quite some work.

As a complement, a search showed that IBM DB2, cited as a reference by 
Pavel, has AUTONOMOUS transactions, which looks pretty much the same thing 
as nested transactions. The documentation presents an interesting use 
security-related use case:

https://www.ibm.com/developerworks/data/library/techarticle/dm-0907autonomoustransactions/

The idea is that an application must record an attempt to access a data 
even if the attempt fails and is rolled-back.

This feature used carefully within an appropriate pattern would allow to 
ensure that if the setup transaction fails then the session status is 
FALSE. One possible inconsistency which may arise with sub xacts is that 
the status may stay FALSE while the setup has succeeded, however this on 
the safe side wrt to the security use case.

-- 
Fabien.



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

Предыдущее
От: Mithun Cy
Дата:
Сообщение: Re: [HACKERS] Cache Hash Index meta page.
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: [HACKERS] pg_recvlogical --endpos