Re: MERGE vs REPLACE - Mailing list pgsql-hackers

From Tom Lane
Subject Re: MERGE vs REPLACE
Date
Msg-id 11204.1132177867@sss.pgh.pa.us
Whole thread Raw
In response to Re: MERGE vs REPLACE  (daveg <daveg@sonic.net>)
Responses Re: MERGE vs REPLACE  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
daveg <daveg@sonic.net> writes:
> I agree, but would like to relax the primary key requirement to simply
> a unique index. I can see use cases for unique so long as not null keys,
> so it would be nice if the MERGE operation would work for these. As nulls
> are not "equal" anyway this doesn't seem to do too much violence to the
> semantics.

But a "unique" key doesn't guarantee that there's only one matching row,
so ISTM you're right back to needing a predicate lock if you do that.
        regards, tom lane


pgsql-hackers by date:

Previous
From: daveg
Date:
Subject: Re: MERGE vs REPLACE
Next
From: Joe Conway
Date:
Subject: Re: Some array semantics issues