Re: MERGE vs REPLACE - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: MERGE vs REPLACE
Date
Msg-id 200511161712.jAGHCAj22465@candle.pha.pa.us
Whole thread Raw
In response to Re: MERGE vs REPLACE  (Jaime Casanova <systemguards@gmail.com>)
List pgsql-hackers
Jaime Casanova wrote:
> On 11/16/05, Bruce Momjian <pgman@candle.pha.pa.us> wrote:
> >
> > Interesting approach.  Actually, we could tell the user they have to use
> > BEGIN;LOCK tab before doing MERGE, and throw an error if we don't
> > already have a table lock.
> >
> 
> If the lock will be required, what's the problem in doing it
> internally? without user interaction?

Because first, we are making it visible to the user, and second the lock
is taken out _before_ we actually execute the statement, meaning we
don't have to escalate our locks.

--  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: "Jim C. Nasby"
Date:
Subject: Re: OS X 7.4 failure
Next
From: Tom Lane
Date:
Subject: Re: OS X 7.4 failure