Re: MERGE vs REPLACE - Mailing list pgsql-hackers

From daveg
Subject Re: MERGE vs REPLACE
Date
Msg-id 20051116213128.GK22209@sonic.net
Whole thread Raw
In response to Re: MERGE vs REPLACE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: MERGE vs REPLACE
List pgsql-hackers
On Wed, Nov 16, 2005 at 09:49:28AM -0500, Tom Lane wrote:
> I think we should do REPLACE-like functionality that simply fails if the
> match condition isn't equality on a primary key.  If we can use SQL-spec
> MERGE syntax for this, that's fine, but let's not think in terms of
> silently changing to a stronger table lock and a much slower
> implementation when the condition isn't a primary key.  That's a whole

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.

-dg

-- 
David Gould                      daveg@sonic.net
If simplicity worked, the world would be overrun with insects.


pgsql-hackers by date:

Previous
From: Rick Gigger
Date:
Subject: Re: MERGE vs REPLACE
Next
From: Tom Lane
Date:
Subject: Re: MERGE vs REPLACE