Re: MERGE vs REPLACE - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: MERGE vs REPLACE
Date
Msg-id 200511160016.jAG0GLa11084@candle.pha.pa.us
Whole thread Raw
In response to Re: MERGE vs REPLACE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: MERGE vs REPLACE  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-hackers
Tom Lane wrote:
> Josh Berkus <josh@agliodbs.com> writes:
> > But even REPLACE requires predicate locking.  There's no real way to get 
> > around it.
> 
> The point though is that REPLACE is restricted to a type of predicate
> narrow enough to be enforced through a unique-index mechanism, and so
> it's implementable without solving the general case of predicate
> locking.
> 
> Predicate locking for narrow cases isn't very hard; it's the general
> case of arbitrary predicates that's hard.

My feeling is we should implement MERGE for the limited cases we can,
and throw an error for cases we can not (or require table locking), and
then see what reports we get from users.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: MERGE vs REPLACE
Next
From: Trent Shipley
Date:
Subject: Re: [ADMIN] Major Problem, need help! Can't run our website!