Re: Duplicate key insert question - Mailing list pgsql-general

From Jean-Christian Imbeault
Subject Re: Duplicate key insert question
Date
Msg-id 3F0234A2.4030407@mega-bucks.co.jp
Whole thread Raw
In response to Duplicate key insert question  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Responses Re: Duplicate key insert question  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Re: Duplicate key insert question  ("Reuben D. Budiardja" <techlist@voyager.phys.utk.edu>)
List pgsql-general
Reuben D. Budiardja wrote:
>
> No, onlu *one* of them will fail, but yes, the other will then generate error.
> So it really is a trade off. Another way would be to lock the table, as other
> has suggested. But then there is disadvantages to that also.

Really? I just got a post form Alvaro Herrera saying;

"The solution is not correct in that there _is_ a race condition."

Maybe I misunderstood, but "not correct" doesn't sound good :)

Jean-Christian Imbeault


pgsql-general by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: Duplicate key insert question
Next
From: Chris Albertson
Date:
Subject: Re: PSQL NEWBIE - RUNTIME ERROR