Re: mysql replace in postgreSQL? - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: mysql replace in postgreSQL?
Date
Msg-id 1130915187.30174.15.camel@Andrea.peacock.de
Whole thread Raw
In response to Re: mysql replace in postgreSQL?  (David Fetter <david@fetter.org>)
List pgsql-general
Am Sonntag, den 30.10.2005, 07:24 -0800 schrieb David Fetter:
...
> > In most cases, just DELETE and then INSERT should work perfectly.
> > (UPDATE and MERGE would cause dead tuples in the same way so in the
> > end they are only syntactical sugar)
> >
> > Another way is a rule for insert which turns it into an update in
> > case the desired tuple is already existent.
>
> That has a race condition in it.  What happens if something deletes
> the tuple between the attempted INSERT and the UPDATE?

How so in a transaction?



pgsql-general by date:

Previous
From: Guido Neitzer
Date:
Subject: Re: PostgreSQL, Mac OS X and locales
Next
From: "Guy Rouillier"
Date:
Subject: Re: PostgreSQL on 64-bit operating systems