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 1sosTT-00ET5Z-0S for pgsql-docs@arkaria.postgresql.org; Thu, 12 Sep 2024 22:39:40 +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 1sosTS-002IsO-Jr for pgsql-docs@arkaria.postgresql.org; Thu, 12 Sep 2024 22:39:38 +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 1sosTS-002Ir2-Bi for pgsql-docs@lists.postgresql.org; Thu, 12 Sep 2024 22:39:38 +0000 Received: from fhigh5-smtp.messagingengine.com ([103.168.172.156]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sosTP-000rya-Bk for pgsql-docs@lists.postgresql.org; Thu, 12 Sep 2024 22:39:37 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 3B1C61140126; Thu, 12 Sep 2024 18:39:34 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Thu, 12 Sep 2024 18:39:34 -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=1726180774; x=1726267174; bh=a0bsMy/z7Z LHgBPiCi78u87nqSwut/aGUnDwQniX3J4=; b=TESgXNe+9kqLj6xP1S1eSIOrS4 Z+eJ03al0dEIaMCM/4lCJiGzLvXCoDifa6PUq7pQH8sRLbj27AL/AdJRz5S7NWst cG7azJH+mNFJwkR8ySmgndKCv3Mz8R7OyqQdv0xUJG6G4QPPI5KoihhisyiEBPSc uB46Lz/EQyneEnl/QWZg+ohdYe6MMr5Tj0LBaKyMDrUNX6lOC4QQQoibmiC/4z21 PQwPN4FZZkZm4Sbih6vUypKz+mUROtvDHWkgvLUr3pkOn9FDaa3r9LZvNbg7jCba PWb4sMHYSFRz1bBWUk0xWdX91O6ou0Om/ofqSUok12theDMvmp4vnFlpEtiA== 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=1726180774; x=1726267174; bh=a0bsMy/z7ZLHgBPiCi78u87nqSwu t/aGUnDwQniX3J4=; b=QQgdWH5Fb1phspRb2MvEPPN2ZqIzsgMpBQkoLXDpz6ZA STll710kEoiCHMbmVJ6qzV5JvFsdUH0Guwl/D9tgnGa8wZSyFbmbXPnwcKyBaYcD 5thUsfk0neGQi/ucSs0dL5zdjoI13gb2kZ6fstv1j5yN5vClETBE0uN+9tfxpmqv jv1ST5AbnGAGhkpbpRru6YCreb2YDZhJVBP7WB4rrpfhxZk36ZBM7hA0rIGQ7dVN gofIxCqR9W0vrIa4NERTJr78Ga3jgtF1+JhPk7ij+JuAPpbZZxPeIM16/F4UAseb q3nYFqt0wexW+JBoMP2nJezJTgCp/Abl5+UkjbCTiA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudejgedgudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnegfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhf gggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruc eomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteel ieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhes phgrqhhuihgvrhdrgiihiidpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouh htpdhrtghpthhtohephhhtrghmfhhiughssehgmhgrihhlrdgtohhmpdhrtghpthhtohep lhgruhhrvghniidrrghlsggvsegthigsvghrthgvtgdrrghtpdhrtghpthhtohepphhgsh hqlhdqughotghssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 12 Sep 2024 18:39:32 -0400 (EDT) Date: Fri, 13 Sep 2024 07:39:13 +0900 From: Michael Paquier To: Greg Sabino Mullane Cc: Laurenz Albe , 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="mv9uToz11onIqtnN" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --mv9uToz11onIqtnN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 12, 2024 at 08:52:00AM -0400, Greg Sabino Mullane wrote: > I do like the simplicity of the bitmap: >=20 > if (reason & 1) > print "Table has changed from logged to unlogged" > if (reason & 2) > print "Default has been changed" >=20 > versus with text[]: >=20 > foreach reason in tablereason[] > if reason.match_exact("ALTER_PERSISTENCE") > print "Table has changed from logged to unlogged" > if reason.match_regex("DEFAULT") > print "Default has been changed" > ... Okay. I am not going to be annoying with compatibility, then :D > My initial reaction was that this is indeed a rare case, and to avoid > putting that level of code detail in the docs. Your argument is a good on= e, > but it still feels wrong to put that there. Yes, this puts a little more > onus on future developers, but updating the docs is already a core > requirement for patches. >=20 > (On reflection, maybe reverse it - put a code comment in event_trigger.h > reminding people to also update the docs? But again, that's seems like > something obvious anyway for someone making that change.) I am not so sure, TBH. One example: I know these values in tablecmds.c for some time because that's an area I tend to focus on for bug fixes, but forgot entirely about the SQL function in event triggers that feed on it until I found your post. A comment in event_trigger.h to mention the doc update would work for me. That would be impossible to miss. -- Michael --mv9uToz11onIqtnN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmbjbZEACgkQnvQgOdby QH1TVQ/8C2P8M9cozvSbekyDVMIkzJLsy0SVrKeLcflkAtC2Pcqfb/WiIgsDIz6y Hehj4Y2mtLlv7IMEJVKh689p95JeshszdcHuSi819BVVOV0vHRYGZK6hpCsUcz+S ZiUzU/to+BqSz6IeWKtroOkCTao19v+xIutZWfvTHcFAs7PQ+h2/IWJ3893cVVHp N601Q8/+nj0D82499FiSUGrlcWq+p5PJzA+6A9p42F8ecwxa4gySisuHO+7eS5WZ OxILY+Feg/GAFLJmuw55CvIKMR1QaP5NCSVX29MFWsekXby2EqYZwN6lOhQfIIZy AXnw72Ex+nYUeD6lGabiRI5/44Q0BLGOA3wEr2xqBpCfiq5ifCbQspAPcwwp1NB4 ROilUb4cFQRhmAOrmGsfztEuPz+wg01LZX2JVQZY7SFmwAlJoQpT42PDEwvCCrD5 vGB5KCVHQsUqARuIoScEnTbK/lmBoxoupzdW92UCgnOFeeGkY/QSYFIh27jSA78M A374J9gzZdWTR4kx2oe73fhk6qaDTxWvrocXoywPHk2wpajC2BcXRVfV4lBORL91 xAoJ0y2J3hpXMiZOGGo12+3FQ2r5drmriSN44qSoNHxZHnn/kMwu5Cex58ko53/U Maw/RHmlMuE36V2e7LC49dS7CUywzXVrzT7qb5nGTDNGxErNAdQ= =WSRz -----END PGP SIGNATURE----- --mv9uToz11onIqtnN--