Re: Vote on SET in aborted transaction - Mailing list pgsql-hackers

From Michael Loftis
Subject Re: Vote on SET in aborted transaction
Date
Msg-id 3CC75B3C.2060208@wgops.com
Whole thread Raw
In response to Re: Vote on SET in aborted transaction  (Jan Wieck <janwieck@yahoo.com>)
List pgsql-hackers

Hiroshi Inoue wrote:

>What's wrong with it ? The insert command after *rollback*
>would fail. It seems the right thing to me. Otherwise
>the insert command would try to append the data of the
>table t1 to itself. The insert command is for copying
>schema1.t1 to foo.t1 in case the previous create schema
>command suceeded.
>
Exactly, in this example shows exactly why SETs should be part of the
transaction and roll back. Heck the insert may not even fail after all
anyway and insert into the wrong schema. If the insert depends on the
schema create succeeding it should be in the same transaction. (IE it
would get rolled back or not happen at all)

>
>
>regards, 
>Hiroshi Inoue
>    http://w2422.nsk.ne.jp/~inoue/
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
>    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Vote totals for SET in aborted transaction
Next
From: Bradley McLean
Date:
Subject: Re: PostgreSQL index usage discussion.