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

Re: [HACKERS] RE: POSTGRES BUG - FIX IT PLEASE

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Mikheev, Vadim" <vmikheev(at)SECTORBASE(dot)COM>
Cc: Sergey Mavrinsky <mavr(at)solvo(dot)ru>, pgsql-bugs(at)postgresql(dot)org, "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] RE: POSTGRES BUG - FIX IT PLEASE
Date: 2000-10-10 21:05:23
Message-ID: Pine.LNX.4.21.0010102252410.759-100000@peter.localdomain (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
Mikheev, Vadim writes:

> > 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.
>                             ^^^^^^^^^^^^^^^
> Is it true?!

Actually, it's not.  Jan Wieck first explained this on July 23 in "Re:
[GENERAL] failed Delete after Insert in a transaction", and we've been
believing it ever since, but I just found out that it's wrong.

The standard reads

         11.8 <referential constraint definition>

         9) If any attempt is made within an SQL-statement to update some
            site to a value that is distinct from the value to which that
            site was previously updated within the same SQL-statement,
            then an exception condition is raised: triggered data change
            violation.
 
        10) If a site in an object row is an <object column> of an <update
            statement: positioned> or <update statement: searched>, and
            there is any attempt within the same SQL-statement to delete the
            row containing that site, then an exception condition is raised:
            triggered data change violation.                                                              

(also  11.8 GR 8 b) i) 2), but it's too boring to quote...)

Note that it talks about "statements", not "transactions".

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


In response to

pgsql-hackers by date

Next:From: Dave SmithDate: 2000-10-10 21:06:37
Subject: Re: Re: [HACKERS] My new job
Previous:From: Adam LangDate: 2000-10-10 21:03:22
Subject: Re: Re: [HACKERS] My new job

pgsql-bugs by date

Next:From: pgsql-bugsDate: 2000-10-12 08:10:34
Subject: psql: ERROR: MultiByte strings (MB) must be enabled to use this function
Previous:From: Mikheev, VadimDate: 2000-10-10 20:07:13
Subject: RE: POSTGRES BUG - FIX IT PLEASE

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