Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCJGy-0001aP-DW for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Nov 2017 05:51:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eCJGx-0007j3-3V for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Nov 2017 05:51:35 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eCJFO-0004uZ-Kt for pgsql-hackers@postgresql.org; Wed, 08 Nov 2017 05:49:58 +0000 Received: from sub4.mail.dreamhost.com ([69.163.253.135] helo=homiemail-a106.g.dreamhost.com) by makus.postgresql.org with esmtps (TLS1.1:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1eCJFH-0007DI-Uv for pgsql-hackers@postgresql.org; Wed, 08 Nov 2017 05:49:57 +0000 Received: from homiemail-a106.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a106.g.dreamhost.com (Postfix) with ESMTP id 6EAEB30002926; Tue, 7 Nov 2017 21:49:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=2vuHj9WT6kG3Zo gUL+vurUkjpog=; b=pXR8z8mtFzjcddUZ/IBvIOTRkh5kZ2Krb722l5ZFn4AozX zd+/IryyjBAZqZ1J5bQjvvqY8gSJ3o+qu6Vc/LpgenwjOQu/a0DNt5TAq2OD7emh rggwNW4IzSTfYKwR7fby1KYwRkWOPcEmYZ3k9SkjHRxjCfeEhenw1bqM2QilE= Received: from localhost (rrcs-69-193-134-98.nyc.biz.rr.com [69.193.134.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a106.g.dreamhost.com (Postfix) with ESMTPSA id AC0FC30002924; Tue, 7 Nov 2017 21:49:48 -0800 (PST) Date: Tue, 7 Nov 2017 23:49:47 -0600 From: Nico Williams To: Peter Geoghegan Cc: Simon Riggs , Robert Haas , Michael Paquier , PostgreSQL-development Subject: Re: MERGE SQL Statement for PG11 Message-ID: <20171108054946.GC4496@localhost> References: <20171101182032.GA7104@marmot> <20171102191636.GA27644@marmot> <20171102210519.GA31574@marmot> <20171102220034.GV4496@localhost> <20171102222548.GA3581@marmot> <20171107232920.GZ4496@localhost> <20171108004546.GB4496@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171108004546.GB4496@localhost> User-Agent: Mutt/1.5.24 (2015-08-30) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Ah, there is one reason not to use a mapping to CTEs to implement MERGE: it might be faster to use a single query that is a FULL OUTER JOIN of the source and target to drive the update/insert/delete operations. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers