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 1oSKSm-00040W-J4 for pgsql-docs@arkaria.postgresql.org; Sun, 28 Aug 2022 15:44:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oSKSl-0004ZJ-F7 for pgsql-docs@arkaria.postgresql.org; Sun, 28 Aug 2022 15:44:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oSKSl-0004Z9-7l for pgsql-docs@lists.postgresql.org; Sun, 28 Aug 2022 15:44:39 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oSKSj-0005Y1-3Y for pgsql-docs@lists.postgresql.org; Sun, 28 Aug 2022 15:44:38 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 715F95C00EA; Sun, 28 Aug 2022 11:44:36 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sun, 28 Aug 2022 11:44:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1661701476; x=1661787876; bh=IkDeMuxyxua6E VyX8uwn1qqU9jxXq9MdHkBPVxMikm8=; b=BtMu8L9Yjsw7qWRGYS8PhXGNSpNRT boJxRZiE11IHw4sW8qC2StRaDDlPeT56UhPi1XA6MEglpZ/uNqDE9byGkwE7R9mW b4jO6fMCRmDMbNLOkQYNcx1AZIaYIU22vQ+2BPxMdqq1AvyErpBU3jVVUi64RerM 4ipplQc4qX/0mq2ZPvx/2d7Oqqs9wGRezlhyQVosaiRWLQKuM+lKmb6h+yIjdZBq P3V698AOKph3INmILGqKXJTqsSs0v1fgj8yDYW+BOnXG7F/J71NGrt5QwplBfoR1 vQQ7xZL2DmAR4b0pH0OVvqdKFvsqg/MN8IaFnMFjbIy3kvaHGNrNHnouA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdejledgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugfgjgesthekre dttddtjeenucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgv segrlhhvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepudejveejffejve duudetvdekieeuiedtvdeileefkeevjedufeeguedvjefhueelnecuffhomhgrihhnpegv nhhtvghrphhrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 28 Aug 2022 11:44:35 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id CF8B4378; Sun, 28 Aug 2022 17:44:45 +0200 (CEST) Date: Sun, 28 Aug 2022 17:44:45 +0200 From: Alvaro Herrera To: postgresql@nowisit.net, pgsql-docs@lists.postgresql.org Subject: Re: Section 40.1 Overview of Event Trigger Behavior, and Table 40.1 missing needed details Message-ID: <20220828154445.ad77dfoze2lvcw6m@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <166162658679.1235920.17515770230362718998@wrigleys.postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Aug-27, PG Doc comments form wrote: > Section 40.1. Overview of Event Trigger Behavior says: > "The table_rewrite event occurs just before a table is rewritten by some > actions of the commands ALTER TABLE and ALTER TYPE." > Issue: Neither the section nor the table describe which actions of ALTER > TABLE. If all actions fire the event trigger then section 40.1 should be > reworded to not suggest that some actions of ALTER table do not fire the > event trigger. I don't follow. Not all actions fire that event trigger. Precisely the point of that event trigger type is to allow you to programmatically discover which actions do rewrite the table, without having to document them exactly. Partly, the reason for this is that some actions can avoid firing it under specific circumstances -- an example is SET DATA TYPE, which most of the time does fire it, but it can be skipped in some cases (say changing varchar(20) to varchar(40)). -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Ellos andaban todos desnudos como su madre los parió, y también las mujeres, aunque no vi más que una, harto moza, y todos los que yo vi eran todos mancebos, que ninguno vi de edad de más de XXX años" (Cristóbal Colón)