Re: proposal: session server side variables

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Joe Conway <mail(at)joeconway(dot)com>
Subject: Re: proposal: session server side variables
Date: 2017-01-04 16:30:07
Message-ID: CAFj8pRCTwEh4GO4HvFA9d8CmBBuoVzq0v3utqB+Ust1NZgV4cw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2017-01-04 16:30:27 Re: proposal: session server side variables
Previous Message Fabien COELHO 2017-01-04 16:19:38 Re: proposal: session server side variables