Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cobP0-0000pi-0o for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Mar 2017 19:49:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cobOz-0004WE-Go for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Mar 2017 19:49:37 +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 1cobOy-0004Vs-DV for pgsql-bugs@postgresql.org; Thu, 16 Mar 2017 19:49:36 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cobOv-0004x1-Su for pgsql-bugs@postgresql.org; Thu, 16 Mar 2017 19:49:35 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id B702220976; Thu, 16 Mar 2017 15:49:32 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Thu, 16 Mar 2017 15:49:32 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=bYVilB6j1JzYXphwfB NT8AMIR/8=; b=qgjhDc8gTZ82bmInMbDmkShWP0FntlaQ1+kEZgI9TVud5F5eWN V8jfk/S/Ixhiv7b3gQvViR0IJmDqpJCv4Fl9NFdlhFJ0cVKWKYrYs2GAGvPch04V /T5mqaOUNytWTgx4zhhAl01Xr2cpNIOz7MztnHPEPW92fUsTAICP7KtJZsao/F9u LhbPYLGB5Gx1DHqABhgVLw/1n7h0DG8MIVb1CQxUuWrN+DW/Vzn8Usb5MM6QbMJv 0osn6jZtLaGEYTAhZVnFB/d4RTtHrzkP23RwQGdaUueXG5+xC9WE6B/9tRfNntQL Lq3kHvkSb8KRGjXvHTN+nnGi7zLaVLyTKNig== X-ME-Sender: X-Sasl-enc: GFd3KsV+qpSqiZtaboCQOAJkILPa6tbUU+xOLvhkntZ/ 1489693772 Received: from intern.anarazel.de (unknown [136.24.76.72]) by mail.messagingengine.com (Postfix) with ESMTPA id 75F9F7E689; Thu, 16 Mar 2017 15:49:32 -0400 (EDT) Date: Thu, 16 Mar 2017 12:49:08 -0700 From: Andres Freund To: Peter Geoghegan Cc: Heikki Linnakangas , Nikolay Samokhvalov , PostgreSQL mailing lists Subject: Re: ON CONFLICT with constraint name doesn't work Message-ID: <20170316194908.5ffknrbpe6ijsze2@alap3.anarazel.de> References: <20920c13-784f-05b5-6f86-dac31dc1d970@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2017-03-16 12:44:23 -0700, Peter Geoghegan wrote: > On Thu, Mar 16, 2017 at 12:42 PM, Heikki Linnakangas wrote: > > We debated this for a long time when the ON CONFLICT feature was being > > developed. In the end, we settled on this behavior, on the grounds that a > > constraint is a logical concept, while an index is a physical implementation > > detail. Note that the SQL standard also doesn't say anything about indexes, > > but constraints are in the standard. > > Right. Besides, you really are only supposed to use the ON CONSTRAINT > syntax when inference won't work, as an escape hatch. This doesn't > look like an example of where inference won't work. That's limited to > ON CONFLICT DO NOTHING with exclusion constraints, which is fairly > limited. FWIW, I never was completely on board with this design goal, and I think we should have (and still should) support using indexes directly. - Andres -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs