Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f89W1-0007PT-8j for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Apr 2018 19:10:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f89W0-0000dP-6I for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Apr 2018 19:10:12 +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.89) (envelope-from ) id 1f89Vz-0000cz-Ro for pgsql-hackers@lists.postgresql.org; Mon, 16 Apr 2018 19:10:12 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f89Vw-00029F-3K for pgsql-hackers@postgresql.org; Mon, 16 Apr 2018 19:10:10 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id A43F91195; Mon, 16 Apr 2018 15:10:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 16 Apr 2018 15:10:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=hgmmdq/2xIlGuyzIp AB1rFM6F6Lp538Ksi4h2TlpGVQ=; b=Htz4d2nW534mGDc1t4ZCEN6FU6tIpH8oS gsB3pYh8zQ6QpoQQix3HInYD31m+m38QHboweQm5CnGHMwUYF+n2QxgDKG6lFf8x X5MHDQ6rkeAiPzQmulihVZ4A1xkJJlbLQNsBScr85rxTS9nqWv3O28NTdwOsFa5A DfLpVzRD5w5USQifadyxEFMx/ih8rrSb/JGmj9a6+n23iT4NHdJTLQe+IJR+ftUE HtonHuadfeQCBdkDOTrc3Ns0lP79erUTlaPx9nJpkjZH9p9YUnheQc/LEGlmHlu3 ERqgWxnwP8MsjcNvMaOWQ2kPOCk59OJSMiNaGSuTHmTBW0Hr42pfQ== X-ME-Sender: Received: from alvin.alvh.no-ip.org (unknown [179.56.29.253]) by mail.messagingengine.com (Postfix) with ESMTPA id E86AFE508F; Mon, 16 Apr 2018 15:10:05 -0400 (EDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id B01897D6; Mon, 16 Apr 2018 16:10:03 -0300 (-03) Date: Mon, 16 Apr 2018 16:10:03 -0300 From: Alvaro Herrera To: Amit Langote Cc: Pavan Deolasee , Etsuro Fujita , Andres Freund , Pg Hackers , Peter Geoghegan Subject: Re: ON CONFLICT DO UPDATE for partitioned tables Message-ID: <20180416191003.34xjvru45icn53ko@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2e42554c-c787-d10f-ac5d-ffca339274e8@lab.ntt.co.jp> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Amit Langote wrote: > The solution I came up with is to call map_variable_attnos() directly, > instead of going through map_partition_varattnos() every time, after first > creating the attribute map ourselves. Yeah, sounds good. I added a tweak: if the tupledescs are equal, there should be no need to do any mapping. (Minor adjustment to the test: "cuarenta" means forty, so I changed the new test to say "cincuenta" instead, which means fifty). Pushed now, thanks. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services