Transaction bug - Mailing list pgsql-bugs

From Brage Førland
Subject Transaction bug
Date
Msg-id 20031027130208.GA52887@sisyfos.zoo.uib.no
Whole thread Raw
Responses Re: Transaction bug
List pgsql-bugs
If you send a transaction as a single query to the backend, it ignores the
commit if the transaction is aborted:

Example:

testdb=# CREATE TEMP TABLE test(test INT PRIMARY KEY, CONSTRAINT testconstraint CHECK (test > 2)  );
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'test_pkey' for table 'test'
CREATE TABLE
testdb=# START TRANSACTION\; INSERT INTO test VALUES(1)\; COMMIT\; ;
ERROR:  ExecInsert: rejected due to CHECK constraint "testconstraint" on "test"
testdb=# SELECT * FROM test;
ERROR:  current transaction is aborted, queries ignored until end of transaction block

(Tested with PostgreSQL 7.3.4)

--
Brage Førland


pgsql-bugs by date:

Previous
From: ljb
Date:
Subject: pgtcl large object read/write corrupts binary data
Next
From: "Bas Scheffers"
Date:
Subject: minor: ~ not resolved in psql