Skip site navigation (1) Skip section navigation (2)

Re: POSTGRES BUG - FIX IT PLEASE

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Sergey Mavrinsky <mavr(at)solvo(dot)ru>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: POSTGRES BUG - FIX IT PLEASE
Date: 2000-10-10 19:40:00
Message-ID: Pine.LNX.4.21.0010102137460.759-100000@peter.localdomain (view raw or flat)
Thread:
Lists: pgsql-bugs
Sergey Mavrinsky writes:

> create table t1
> (
>         f1 integer,
>         f2 integer
> );
> 
> create table t2
> (
>         f1 integer references t1(f1),
>         f2 integer
> );

> begin transaction;
> insert into t1(f1,f2) values(1,1);
> delete from t1 where f1=1;

> ERROR:  triggered data change violation on relation "t1"

You cannot change data twice within a transaction if there's a RI
constraint on the table.  This is per SQL, nothing we can do about it.

-- 
Peter Eisentraut      peter_e(at)gmx(dot)net       http://yi.org/peter-e/


In response to

pgsql-bugs by date

Next:From: Mikheev, VadimDate: 2000-10-10 20:07:13
Subject: RE: POSTGRES BUG - FIX IT PLEASE
Previous:From: Bruce MomjianDate: 2000-10-10 17:13:25
Subject: Re: Referencial integrity when there are timestamp primary keys

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group