Re: Incorrect START TRANSACTION implementation
От | Tom Lane |
---|---|
Тема | Re: Incorrect START TRANSACTION implementation |
Дата | |
Msg-id | 25187.1075227678@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Incorrect START TRANSACTION implementation (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: Incorrect START TRANSACTION implementation
|
Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes: > 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 Are you sure you're reading that correctly? It says <set transaction statement> not <set session characteristics statement>. What use would SET SESSION CHARACTERISTICS have at all, if it's ignored by START TRANSACTION? It appears to me that the spec is saying that *this* should work: regression=# set transaction read only; SET regression=# start transaction; START TRANSACTION regression=# create table test (a int); CREATE TABLE ... which it does. regards, tom lane
В списке pgsql-hackers по дате отправления: