Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1soGPJ-009jaP-U7 for pgsql-docs@arkaria.postgresql.org; Wed, 11 Sep 2024 06:00:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1soGPJ-009e3K-7w for pgsql-docs@arkaria.postgresql.org; Wed, 11 Sep 2024 06:00:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1soGPJ-009e3C-0W for pgsql-docs@lists.postgresql.org; Wed, 11 Sep 2024 06:00:49 +0000 Received: from fhigh4-smtp.messagingengine.com ([103.168.172.155]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1soGPC-000a7g-5r for pgsql-docs@lists.postgresql.org; Wed, 11 Sep 2024 06:00:47 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 22D9C114030E; Wed, 11 Sep 2024 02:00:41 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Wed, 11 Sep 2024 02:00:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1726034441; x=1726120841; bh=gQT4nHg1+V RC8xAfbRPxmDq1mbZyPAe7yA+l+0f5yuE=; b=gttw285DxzxoZl9cPckhzzUl4i URUx+IovGhvkbsA2i8jagiYVJzrLlHTh3MSTAxL0ipevZZbrS60dN3iQSktD+Phl 6S3rEP6Mzw5Xw+TVTVH9RfkrZP6xX5Aw19sju9FQDLF/aDqA2eQaVI5F360dxurk DwJfGfWWvUl0rHZ9KlKNY536YQk9dfcEpHo3xTKbvuKtgjSrbrarehBZGhsLSBoq PkxhRSLVXhl2SoAsEbpDmxcMqxpqBY8J1rW9mZFToSMCZefXblD4HOhpx5qpZr38 pHixaDe1zpLXOPE4B73dBgYQTiqOJmYMewx41AnU7mS9EjkkQm+Qg7ygDtuQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1726034441; x=1726120841; bh=gQT4nHg1+VRC8xAfbRPxmDq1mbZy PAe7yA+l+0f5yuE=; b=r+Sg8iGEgMgLdFDkspcmTi0AN46JGhlod/s5VCsq2C3e jtSt8HW26XxdaUa8uYGuRib0pJ5ev6yKWOr6ZT03SSm4TwCq9hd9vNkyzcsJTXSb 2maVUHNameDS8WmHVI8hfuymQkGGlVp3v/5fgmVOOQ91KxFiWIRurz1veuzNBqRH 4SxwZeRFpo3HvrWxZ+f6Al/jeEh3nyrF0Rp/YVSqYisv+5zaWVg5gVE9WPbOFfiw DX0bVRLoAdw3cU1Cl5Hq5WoKXrQLLCFNQ3WErja9o2AAP39rl3XxQyN5M3f6MW7u EIE8lO+RT1/ijI6CTBF/1pb9BWYlxVdib/jTDBAUTw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudejtddguddtudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenfghrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffk fhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrh cuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeet leeifedufffhhfdtteelgeeggeffhfekueevteeigfduudevudetgfegiedvjeenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghl sehprghquhhivghrrdighiiipdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehlrghurhgvnhiirdgrlhgsvgestgihsggvrhhtvggtrdgrthdp rhgtphhtthhopehhthgrmhhfihgushesghhmrghilhdrtghomhdprhgtphhtthhopehpgh hsqhhlqdguohgtsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Sep 2024 02:00:38 -0400 (EDT) Date: Wed, 11 Sep 2024 15:00:31 +0900 From: Michael Paquier To: Laurenz Albe Cc: Greg Sabino Mullane , pgsql-docs Subject: Re: Table rewrite supporting functions for event triggers Message-ID: References: <718fcf4a067b576b501bd5b18b54a1fdc4fda639.camel@cybertec.at> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MteqK8VgG19KIocY" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --MteqK8VgG19KIocY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 03, 2024 at 09:34:02PM +0200, Laurenz Albe wrote: > On Tue, 2024-09-03 at 11:54 -0400, Greg Sabino Mullane wrote: >> How about something like this? >=20 > This patch looks good to me. - Returns a code explaining the reason(s) for rewriting. The exact - meaning of the codes is release dependent. + Returns a code explaining the reason(s) for rewriting. The value is + a bitmap built from the following values: 1 (the table has changed + persistence), 2 (a column has changed a default value), 4 (a column + has a new data type), and 8 (the table access method has changed). Agreed that the user experience with this function is poor and that the documentation should be improved. Still, I am not sure that this is optimal. On top of the values, how about adding the variable names and also mention that these are defined in event_trigger.h? Putting the documentation change aside for a bit, could it be better to redesign this function and return a text value rather than an integer? We could directly return the names, minus "AT_REWRITE_", for instance. -- Michael --MteqK8VgG19KIocY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmbhMf8ACgkQnvQgOdby QH1Chw//cC36cSgsFmfItU7jvyLNDw/h+GvSnilTwmtndscQn3UWgne6m2ypNW/Y 1YiW3hhWf0UuCE7d/iJ3lyhYJ4WdkSBFVWkcBgODR3IC4H4uyhgJoT0gSG010lG+ +oQwL+4uTNV0CL619hD+MdyHgqnz1GzFrWE98zlEnhUqf0wAG6TKFP2l3WWYzYsT GjkrrhywR0nqxDJD80WAHju9uBD3pQ+1dQZR8TyiaZ86UogsYtvqxUPFFY/CNY1z Fz8jGX/KkVVR1pKF1bttQVNp0hy/vgQ3dsQub9lpTT/Pj9C2ST55F78A141rD/u+ un9HMkdbHDe9W+bkjl/tKepSKAjGyfn0f2cu80pJIjg9g94qWC6ZLs6WHxkDOUQw LR3ooAf4rV8c8AZ4UQUws6aR+eeYFMsCvqnxFKPue0f+i+RuwTHjqM+JHi+bX20y 8DgiDLEwx8pzjnVIEtWQfOFAyMqh0FdKd1iXVsA6lYXzDgy4bspjDJ9hwka0GcaG n3wm2OIGWIeywh2QwnHGi8Rpyw2daKsQpWKOuZ0W0eAaOW9SyyYUBA9tJpBDgRrI clh3WtCQtSJwru0aZzounXewMPTQCQepV+QLDFTbFuPqZsIEgcqjiF3EHuJf55RO mKOnV/1dNoCV9JGidR1+Mhu89nHlC+XT0MNsj67oiNP9UQFkM8w= =/f/j -----END PGP SIGNATURE----- --MteqK8VgG19KIocY--