Re: Adding MERGE to the TODO list (resend with subject) - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Adding MERGE to the TODO list (resend with subject)
Date
Msg-id 409D8E48.3070805@familyhealth.com.au
Whole thread Raw
In response to Re: Adding MERGE to the TODO list (resend with subject)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Adding MERGE to the TODO list (resend with subject)  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-hackers
> What does the MERGE command do?  I have never heard of it, so I doubt
> someone is working on it.

It is basically the SQL standard version of MySQL's REPLACE syntax.  It 
does an update-else-insert set.  However, the trick is that it uses some 
sort of next key locking to ensure that it cannot fail.  Something that 
is impossible to do in PostgreSQL at the moment. Nested transactions 
will help, however.

Chris



pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Comments on all system objects
Next
From: Alvaro Herrera
Date:
Subject: Re: Adding MERGE to the TODO list (resend with subject)