Search Postgresql Archives

Re: mysql replace in postgreSQL?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux