Re: SET TRANSACTION not compliant with SQL:2003

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: SET TRANSACTION not compliant with SQL:2003
Дата
Msg-id 87y77nibo4.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: SET TRANSACTION not compliant with SQL:2003  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> I believe the reason the spec is written in the particular way that
> it is is that they wanted to allow, e.g.,
>
>     set transaction isolation level serializable;
>     set transaction read only;
>     sql-command;
>     sql-command;
>     ...
>     commit;

So that works currently. I think you're right that the spec has to be read
assuming autocommit off.

postgres=# \set AUTOCOMMIT off
postgres=# set transaction isolation level serializable;
SET
postgres=# set transaction read only;
SET
postgres=# create table foo (i integer);
ERROR:  transaction is read-only
postgres=# rollback;
ROLLBACK
postgres=# set transaction read only;
SET
postgres=# set transaction isolation level serializable;
SET
postgres=# create table i (integer i);
ERROR:  transaction is read-only


--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support!


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Commit fest queue
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: [PATCHES] libpq type system 0.9a