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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Incorrect START TRANSACTION implementation


  • From: Peter Eisentraut <peter_e(at)gmx(dot)net>
  • To: pgsql-hackers(at)postgresql(dot)org
  • Subject: Incorrect START TRANSACTION implementation
  • Date: Tue, 27 Jan 2004 18:16:47 +0100
  • Message-id: <200401271816.47493.peter_e@gmx.net> <text/plain>

SQL99 part 2 clause 16.1 contains this note:

    NOTE 327 - The characteristics of a transaction begun by a
    <start transaction statement> are as specified in these General
    Rules regardless of the characteristics specified by any
    preceding <set transaction statement>. That is, even if one
    or more characteristics are omitted by the <start transaction
    statement>, the defaults specified in the Syntax Rules of this
    Subclause are effective and are not affected by any (preceding)
    <set transaction statement>.

In other words, this should work:

peter=# set session characteristics as transaction read only;
SET
peter=# start transaction;
START TRANSACTION
peter=# create table test (a int);
ERROR:  transaction is read-only

because the default of a bare "start transaction" is read write.  I 
propose that we change this to follow the standard and keep the 
traditional behavior for BEGIN only.




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group