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 1euIFt-0001ua-6n for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Mar 2018 13:40:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1euIFr-0006QE-To for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Mar 2018 13:40:15 +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.89) (envelope-from ) id 1euIFr-0006Pt-GE for pgsql-hackers@lists.postgresql.org; Fri, 09 Mar 2018 13:40:15 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1euIFn-0004zr-Du for pgsql-hackers@postgresql.org; Fri, 09 Mar 2018 13:40:14 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 1A87A20DD4; Fri, 9 Mar 2018 08:40:09 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Fri, 09 Mar 2018 08:40:09 -0500 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:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=4bDfOD k+6XYiMlfhs+KKBJfYhFsqCVpevqy7pKRODxQ=; b=cbvEKek2qvQg5mZ3AiqRBR SfQsd30hlFfM/Xu1W1oQa4rR8+7vZQOafO+Wb0ToDy3BmHoZ2wxcjZSySyCtvZyK YsCfaqxLqwTP1nbi6oXFgmBuPyJS2j2VrELqo0j0v60/4onJW3hmYqBSzefM3H/A 1JK371hSjRy/VM48LTEcnOyi4i8cipkSvY/ClxyzNx095s6ebV/+9C9nodWIJP7t 3lyeKN9Q7Z95WRRZpVJxkKyGyJYnIjHCidw6O2FtbajyMRc/y7gS1m9XC91AMYZV LkTmOyeFaHJeu5gH28indI9NHb4+CWMFPI35K2R1RkwmVfMZ/n+apBt4lzA99LIQ == X-ME-Sender: Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id A2979246D0; Fri, 9 Mar 2018 08:40:08 -0500 (EST) Subject: Re: FOR EACH ROW triggers on partitioned tables To: Alvaro Herrera , Robert Haas References: <20180308015708.kc755cmaadpxgpyg@alvherre.pgsql> Cc: Pg Hackers , Simon Riggs From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <891b78d0-4b00-4611-2000-3ce96cf73c26@2ndquadrant.com> Date: Fri, 9 Mar 2018 08:40:08 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180308015708.kc755cmaadpxgpyg@alvherre.pgsql> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/7/18 20:57, Alvaro Herrera wrote: > So, unless someone has a brilliant idea on how to construct a column > mapping from partitioned table to partition, I'm going back to the > design I was proposing earlier, ie., creating individual pg_trigger rows > for each partition that are essentially adjusted copies of the ones for > the partitioned table. Yes, that seems easiest. The idea of having only one pg_trigger entry was derived from the assumption that we wouldn't need the other ones for anything. But if that doesn't apply, then it's better to just go with the straightforward way instead of bending the single-pg_trigger way to our will. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services