ERROR: Triggered data change violation.
От | Constantin S. Svintsoff |
---|---|
Тема | ERROR: Triggered data change violation. |
Дата | |
Msg-id | Pine.BSF.4.21.0111011717050.40751-100000@lizard.plesk.ru обсуждение исходный текст |
Список | pgsql-hackers |
hi, there! If I have two tables, first with primary key, second references to first and in one transaction I insert row in any of these tables and when try to delete it, I receive : ERROR: triggered data change violation on relation 'xxx' Here is an example: temp=# CREATE TABLE prim (i int primary key); NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'prim_pkey' for table 'prim' CREATE temp=# create table fore (j int references prim); NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) CREATE temp=# insert into prim values(1); INSERT 85836 1 temp=# begin; BEGIN temp=# INSERT INTO fore values (1); INSERT 85837 1 temp=# delete from fore; ERROR: triggered data change violation on relation "fore" temp=# rollback; ROLLBACK temp=# begin; BEGIN temp=# INSERT INTO prim VALUES (2); INSERT 85880 1 temp=# DELETE from prim where i = 2; ERROR: triggered data change violation on relation "prim" temp=# rollback; ROLLBACK temp=# select version(); version -------------------------------------------------------------PostgreSQL 7.1.3 on i686-pc-linux-gnu, compiled by GCC 2.96 (1 row) /Constantin
В списке pgsql-hackers по дате отправления: