Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5ej8-0008IH-0v for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Jul 2021 01:39:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m5ej6-0006ef-4u for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Jul 2021 01:39:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5ej5-0006eW-99 for pgsql-hackers@lists.postgresql.org; Tue, 20 Jul 2021 01:39:15 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5ej2-0006A6-1c for pgsql-hackers@lists.postgresql.org; Tue, 20 Jul 2021 01:39:14 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 512415C01A3; Mon, 19 Jul 2021 21:39:09 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 19 Jul 2021 21:39:09 -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-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=x17FvYORDfxuTM72A+dIBI9CowW1bpOi5musZoq02QA=; b=Yx9hyyGv BOKAT+9kroljqeQ16kJQrRxaT5pBlA6nBo+F46RVVnzJ0kgLmtmDlaDMZbm1Y7wn 3m4JW3WnqpimnF3gvQ1TuAl3/qkqbPKlZ0QVcLEFfrejvFrwMey9G1mI14byKXwr VP8UXDIkkC28JxS/RxCNKzzZbPw8vIanUunGtweBrKc6cw2ETLfzI5RWSfpzZIZH VMG6cdcJCozFHNHXJPuzvLpkMsWLYj9z6lFOB0j8TuEpEdX9oZGjok6Ld8Rqapd7 yLp3kjKwn1zo2P5WCQrIIbJR8GsAAY8RoIscSc2JznR9ocGuhe3Bbk3hVM1jKP+A QY1oOl1qfqbDgA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfedugdegvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepudejveejffejveduudetvdekieeuiedtvdeileefkeevjedu feeguedvjefhueelnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgv rhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Jul 2021 21:39:08 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 0134B2A0803; Mon, 19 Jul 2021 21:39:04 -0400 (-04) Date: Mon, 19 Jul 2021 21:39:04 -0400 From: Alvaro Herrera To: Arne Roland Cc: vignesh C , Zhihong Yu , Pg Hackers Subject: Re: Rename of triggers for partitioned tables Message-ID: <202107200139.5zceapxcs6z7@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <004683a28e714bf3beb9a413a2ffbcb9@index.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jul-20, Arne Roland wrote: > Is your patch based on master? It doesn't apply at my end. It does ... master being dd498998a3 here, $ patch -p1 < /tmp/renametrig-8.patch patching file src/backend/commands/trigger.c patching file src/backend/parser/gram.y patching file src/test/regress/expected/triggers.out patching file src/test/regress/sql/triggers.sql applies fine. >> I don't think we need to give a NOTICE when the trigger name does not >> match; it doesn't really matter that the trigger was named differently >> before the command, does it? > I'd expect the command > ALTER TRIGGER name ON table_name RENAME TO new_name; > to rename a trigger named "name". We are referring the trigger via it's name after all. If a child is named differently we break with that assumption. I think informing the user about that, is very valuable. Well, it does rename a trigger named 'name' on the table 'table_name', as well as all its descendant triggers. I guess I am surprised that anybody would rename a descendant trigger in the first place. I'm not wedded to the decision of removing the NOTICE, though ... are there any other votes for that, anyone? Thanks -- Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/