Re: Replaceing records - Mailing list pgsql-general

From Csaba Nagy
Subject Re: Replaceing records
Date
Msg-id 1062691810.6781.148.camel@coppola.ecircle.de
Whole thread Raw
In response to Re: Replaceing records  (Greg Stark <gsstark@mit.edu>)
List pgsql-general
> You can do
>  INSERT INTO tab (...) VALUES (...) ON DUPLICATE KEY UPDATE col=val, ...

This would allow making sure insert won't throw exceptions on unique
constraint violations. Good enough to avoid breaking transactions.

>
> But I'm not sure how convinced the developers are of its usefulness beyond
> satisfying mysql migrations. I've never used mysql and I have seen a few times
> it might have been useful. Not a lot, but a few. And it seems to be a frequent
> question on the mailing list.

If nested transactions is easier to implement, that would be better.
Covers more of the current problems.

Cheers,
Csaba.



pgsql-general by date:

Previous
From: Alvaro Herrera Munoz
Date:
Subject: Re: [HACKERS] tablelevel and rowlevel locks
Next
From: "Andrew L. Gould"
Date:
Subject: FYI: Avoiding write conflict errors in MS Access clients