PD: triggered data change violation on relation "tbl_b" - Mailing list pgsql-bugs

From Pawel Pawlowski
Subject PD: triggered data change violation on relation "tbl_b"
Date
Msg-id 004f01c1307c$44c391b0$3200000a@breitenbach.pl
Whole thread Raw
Responses Re: PD: triggered data change violation on relation "tbl_b"  (Andreas Wernitznig <andreas@insilico.com>)
List pgsql-bugs
When I insert to table new row and after this in the same transaction I del=
ete this row I get such error:=20
triggered data change violation on relation "tbl_b"

I've created database using simple script:

CREATE TABLE tbl_a
(
  pn_id         SERIAL,
  pn_a  VARCHAR(400) NOT NULL,
  PRIMARY KEY (pn_id)
);
CREATE TABLE tbl_b
(
  pc_id      INT4 NOT NULL REFERENCES tbl_a (pn_id) ON UPDATE CASCADE ON DE=
LETE CASCADE,
  pc_b       VARCHAR(40) NOT NULL,
  PRIMARY KEY (pc_id, pc_b)=20=20
);
INSERT INTO tbl_a VALUES (1, 'xxx');

And this is the sample script that I use to generete this bug:

begin transaction;
insert into tbl_b values (1, 'xxx');
delete from tbl_b where pc_id=3D1;
ERROR:  triggered data change violation on relation "tbl_b"

How to solve this problem ?????

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Bug #429: Concurrent JDBC connections to result in wrong data
Next
From: Andreas Wernitznig
Date:
Subject: Re: PD: triggered data change violation on relation "tbl_b"