Re: MERGE vs REPLACE - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: MERGE vs REPLACE
Date
Msg-id 20051116040411.GI44860@pervasive.com
Whole thread Raw
In response to Re: MERGE vs REPLACE  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: MERGE vs REPLACE  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers
On Tue, Nov 15, 2005 at 07:16:21PM -0500, Bruce Momjian wrote:
> 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.

We should probably throw a notice or warning if we go to a table lock,
too.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: bind variables, soft vs hard parse
Next
From: Tom Lane
Date:
Subject: Re: OS X 7.4 failure