Re: SET SESSION TRANSACTION command

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SET SESSION TRANSACTION command
Дата
Msg-id 14827.1136151841@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SET SESSION TRANSACTION command  (Qingqing Zhou <zhouqq@cs.toronto.edu>)
Список pgsql-general
Qingqing Zhou <zhouqq@cs.toronto.edu> writes:
> On Sun, 1 Jan 2006, Tom Lane wrote:
>> "Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
>>> test=# SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
>>
>> SESSION is taken as a noise word here.  Possibly we should disallow this
>> syntax altogether, since it isn't SQL-spec ... but I'm not sure it's
>> worth contorting the grammar enough to do that.

> Other GUC variables work well of the SET SESSION after a few tests.

This one works fine too: you misunderstand what the semantics are.
There is default_transaction_isolation which is the session-level
setting, and there is transaction_isolation which is, by definition,
reset to default_transaction_isolation at the start of every
transaction.

The only way the above command should do anything different than what
it does now is to give an error, on the grounds that it's a
contradiction in terms.  The SQL-spec spelling of what you are
interested in is
SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE;

            regards, tom lane

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

Предыдущее
От: Qingqing Zhou
Дата:
Сообщение: Re: SET SESSION TRANSACTION command
Следующее
От: Tony Caduto
Дата:
Сообщение: using PG with Syslog