X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8EC3BD1E28E for ; Sun, 9 May 2004 13:10:13 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 85979-09 for ; Sun, 9 May 2004 13:09:51 -0300 (ADT) Received: from 216.155.88.75.dsl.surnet.cl (216.155.86.73.DSL.surnet.cl [216.155.86.73]) by svr1.postgresql.org (Postfix) with ESMTP id 06B73D1B8B6 for ; Sun, 9 May 2004 13:09:51 -0300 (ADT) Received: by 216.155.88.75.dsl.surnet.cl (Postfix, from userid 500) id EABC4134FD; Sun, 9 May 2004 12:09:49 -0400 (CLT) Date: Sun, 9 May 2004 12:09:49 -0400 From: Alvaro Herrera To: Christopher Kings-Lynne Cc: Bruce Momjian , elein , PostgreSQL-development Subject: Re: Adding MERGE to the TODO list (resend with subject) Message-ID: <20040509160949.GA3897@dcc.uchile.cl> References: <200405082246.i48MkTQ29755@candle.pha.pa.us> <409D8E48.3070805@familyhealth.com.au> <20040509035405.GA917@dcc.uchile.cl> <409DAFEB.7020300@familyhealth.com.au> <20040509051825.GB917@dcc.uchile.cl> <409DC28A.7010509@familyhealth.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <409DC28A.7010509@familyhealth.com.au> User-Agent: Mutt/1.5.5.1i X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=2.6 tagged_above=0.0 required=5.0 tests=RCVD_IN_DYNABLOCK, RCVD_IN_SORBS X-Spam-Level: ** X-Archive-Number: 200405/454 X-Sequence-Number: 53532 On Sun, May 09, 2004 at 01:32:58PM +0800, Christopher Kings-Lynne wrote: > >>Except you can keep trying and trying without the outermost transaction > >>failing. > > > >But that won't provide the necessary next key locking you mentioned in > >your first email, will it? > > No, but since I can loop an infinite number of times until either the > update or insert works, I don't need next key locking. Oh, I see. Complex stuff ... I wonder how will it work with sequences -- if one insertion fails and we have to try again, there's a chance a sequence could be advanced more than once. Note the article skips the "signal-statement" symbol (is it present in SQL99? What does it do?) I also wonder if there will be a corresponding RULE implementation ... The full DB2 reference is at http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.udb.doc/admin/r0010873.htm (signal-statement is something to raise an exception, apparently) (I wonder why they don't use BNF syntax anymore ...) -- Alvaro Herrera () "Cuando maņana llegue pelearemos segun lo que maņana exija" (Mowgli)