Re: SET SESSION TRANSACTION command

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SET SESSION TRANSACTION command
Date: 2006-01-01 21:44:01
Message-ID: 14827.1136151841@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu> writes:
> On Sun, 1 Jan 2006, Tom Lane wrote:
>> "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tony Caduto 2006-01-01 21:52:59 Re: sending mail from Postgres
Previous Message Qingqing Zhou 2006-01-01 21:02:23 Re: SET SESSION TRANSACTION command