Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9FDY-0008K7-7a for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Oct 2017 18:55:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e9FDX-00023l-Lv for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Oct 2017 18:55:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e9FDV-00020u-JI for pgsql-hackers@postgresql.org; Mon, 30 Oct 2017 18:55:21 +0000 Received: from static-96-255-250-162.washdc.fios.verizon.net ([96.255.250.162] helo=tamriel.snowman.net) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9FDM-0007hQ-Lx for pgsql-hackers@postgresql.org; Mon, 30 Oct 2017 18:55:19 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id A62615F797; Mon, 30 Oct 2017 14:55:11 -0400 (EDT) Date: Mon, 30 Oct 2017 14:55:11 -0400 From: Stephen Frost To: Robert Haas Cc: Simon Riggs , Peter Geoghegan , Michael Paquier , PostgreSQL-development Subject: Re: MERGE SQL Statement for PG11 Message-ID: <20171030185511.GJ4628@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6GhlQVkdqWyn5nVY" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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 --6GhlQVkdqWyn5nVY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Robert Haas (robertmhaas@gmail.com) wrote: > On Sun, Oct 29, 2017 at 1:19 AM, Simon Riggs wrot= e: > > Nothing I am proposing blocks later work. >=20 > That's not really true. Nobody's going to be happy if MERGE has one > behavior in one set of cases and an astonishingly different behavior > in another set of cases. If you adopt a behavior for certain cases > that can't be extended to other cases, then you're blocking a > general-purpose MERGE. >=20 > And, indeed, it seems that you're proposing an implementation that > adds no new functionality, just syntax compatibility. Do we really > want or need two syntaxes for the same thing in core? I kinda think > Peter might have the right idea here. Under his proposal, we'd be > getting something that is, in a way, new. +1. I don't think MERGE should be radically different from other database systems and just syntax sugar over a capability we have. The downthread comparison to partitioning isn't accurate either. There's a reason that we have INSERT .. ON CONFLICT and not MERGE and it's because they aren't the same thing, as Peter's already explained, both now and when he and I had exactly this same discussion years ago when he was working on implementing INSERT .. ON CONFLICT. Time changes many things, but I don't think anything's changed in this from the prior discussions about it. Thanks! Stephen --6GhlQVkdqWyn5nVY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJZ93WPAAoJEO1sijiDR2RVNyEP/3PNXgeyTFlzA4X/55bOzrwr EUDW6OVN/4+4kK9EZ0YdG/4iVVF8sS/uiOPtLfywXOYBVt5Us6LgrO0qq0yUVh0q 2r7cS8J8EBHc73AArAEjyqahiUtZ7xdntXGikMrKRxrAqrAmtM0/n6f6qH8j1qzu zcmss0+QYvScjpa3aV2rNcjkNgeRHWH6xvFLxrdgh6kwJbCCxxc2p/5JFwwwk27y 7gX/khzQWkOp3vVQfcjD8ywiN9B/Ea23dqNvrA/jnEMTTe2gmjljmHI71ais6Fbk j2TfBt8RIpt31qaLeIKVeelTXrFHrjEDzhbFf4/XkpTuWYkowDaEbCg60vv5BG+U 5+5zLaBXXBkv+guMkgMlEN2/GC5t7A+IYrO/j4YkLwuqdUWg3l50rVbhllp7qVie /Gbstr5My2kSfA379uREkKLoE+C2WpLpdyvMBZmS9OaLWFiwPww2kKvrs3wMoWWN Tr3B+ukpplvniH1qE+jGoPi+dze41SPocz8Ekxtmgv6Murpqla0PzwGur7/dbRdU kSAERYPrafzScsS9QsYPLQtO1FVQQViNPX4Y87NqaUzgx2qvN6jtEpRGuC5RSjNc ZyS5mNJhRnybkGEfTgz4vALRno4+dPQXbRyxlvBajmnjpNTKQXZLTh7eL2aWCNAQ 0RXrjPVbH42M+khs+7Ys =2cSz -----END PGP SIGNATURE----- --6GhlQVkdqWyn5nVY--