Skip site navigation (1) Skip section navigation (2)

SET TRANSACTION conformance to SQL:2003

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: SET TRANSACTION conformance to SQL:2003
Date: 2007-09-07 13:00:32
Message-ID: 1189170032.4175.513.camel@ebony.site (view raw or flat)
Thread:
Lists: pgsql-patches
Short patch to implement SQL standard behaviour of the SET TRANSACTION
command. According to their publically accessible docs, I note that
MySQL and Ingres correctly implement this behaviour, SQLServer does this
also (and more), while Oracle and DB2 do so since they use implicit
transaction blocks.

Docs page updated.

Manual tests OK. There isn't a test suite for SET TRANSACTION, so I
haven't created one just for this. Behaviour is shown below; the SET
command sets the session characteristics of the *next* transaction, when
executed outside of a transaction block.

postgres=# show transaction_read_only;
 transaction_read_only 
-----------------------
 off
(1 row)

postgres=# set transaction read only;
SET
postgres=# begin;
BEGIN
postgres=# show transaction_read_only;
 transaction_read_only 
-----------------------
 on
(1 row)

postgres=# commit;
COMMIT


-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com


Responses

pgsql-patches by date

Next:From: Simon RiggsDate: 2007-09-07 13:17:11
Subject: Re: SET TRANSACTION conformance to SQL:2003
Previous:From: Heikki LinnakangasDate: 2007-09-07 11:02:20
Subject: XML binary I/O (was Re: tsearch refactorings)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group