Re: BUG or strange behaviour of update on primary key

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: desmodemone <desmodemone(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, l(dot)denardo(at)miriade(dot)it, f(dot)dalmaso(at)miriade(dot)it
Subject: Re: BUG or strange behaviour of update on primary key
Date: 2011-10-18 02:00:02
Message-ID: CA+TgmobZc3ESA2ffCrQi-kA0HL7d=CMEzO4K11Qtkq1Ngy_s6w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 17, 2011 at 7:30 PM, desmodemone <desmodemone(at)gmail(dot)com> wrote:
> Seems an Oracle bug not Postgresql one!

I don't think it's a bug for it to work. It'd probably work in
PostgreSQL too, if you inserted (2) first and then (1). It's just
that, as Tom says, if you want it to be certain to work (rather than
depending on the order in which the rows are inserted), you need the
checks to be deferred.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-10-18 02:14:53 Re: HeapTupleHeaderAdvanceLatestRemovedXid doing the wrong thing with multixacts
Previous Message desmodemone 2011-10-17 23:30:49 Re: BUG or strange behaviour of update on primary key