From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Simon Riggs" <simon(at)2ndquadrant(dot)com>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: SET TRANSACTION not compliant with SQL:2003 |
Date: | 2008-04-09 10:07:39 |
Message-ID: | 87y77nibo4.fsf@oxford.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)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!
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Stark | 2008-04-09 10:13:50 | Re: [PATCHES] libpq type system 0.9a |
Previous Message | Heikki Linnakangas | 2008-04-09 07:26:18 | Re: Commit fest queue |