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 1lrgPP-0007ge-Ol for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Jun 2021 12:37:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lrgPN-0005w4-Ky for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Jun 2021 12:37:09 +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 1lrgPN-0005tX-Bz for pgsql-hackers@lists.postgresql.org; Fri, 11 Jun 2021 12:37:09 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrgPI-000170-C8 for pgsql-hackers@lists.postgresql.org; Fri, 11 Jun 2021 12:37:08 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 607BB196B; Fri, 11 Jun 2021 08:37:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 11 Jun 2021 08:37:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=oYB1rCjKMQ4ht5cvyU0d8R10x7J gFwdGe7dMPfvhePY=; b=ho+eoJ+2cq61+mlMd1j8ZRbhM8nj0UNBUaxNjK+xIsp xwx8X3mAwSg+sW22nZMWAmeQLUr5DAK8gaQJhK6z47PS4ajzbQsQZxEQkSstUswK Q0Fubtus+kqCkncsqJ0wLk4p0fBww6HLZ54c1RIdY0hLxjPwnEj1X82WK1+R9Lfi USF4A9hKpxxvoRM+h9WicFKeRfBO/bDdqkl2G7d9jFPMTrc/t9micko2Z7rCYlXi IWhn26flhff7RRQ1kZmrH6Aaj5tt2zsnatoB26Wv5d1uh3z3sBJmSgyCmxGVgke5 fERoJA/b7ItGPI6AJ2leGHxD4fCghdM0HtllP/5FDZQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=oYB1rC jKMQ4ht5cvyU0d8R10x7JgFwdGe7dMPfvhePY=; b=XOCyqHmdGra/rVxCq5//Vt RAx1fjOZY2QKWij57rAvlyRaTgrZjKxYadqAQ/l+KpKzFV4BLvwrdaFrE2xiTdDC 8U7bIPdKs2tdBKRS9O8eGrUyDdFyBmXqkL0LVAGjHReYPX3aNTVk+a1+qZXIC+fB zEiwZhr7smPbbv1Bg6Bxj6T9cy5nOuqurnU29ZTNyVQmg/Qe2gMIZILQF1tD2phG G8ZTIQmHzfF/FbOaahM8Aw9KVajkrJGv4w2tf6brzBjSIcpdfAMOBjZuBKogxKOZ zn8Gj0EyOhxEgCEmCnKKFiwZGrNrjr6U9qNnZsanQRiKQPITHRBEih07NRG2yh7A == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedujedgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 11 Jun 2021 08:36:59 -0400 (EDT) Date: Fri, 11 Jun 2021 21:36:57 +0900 From: Michael Paquier To: Aleksander Alekseev Cc: Alvaro Herrera , PostgreSQL Hackers , Sven Klemm Subject: Re: Fix dropped object handling in pg_event_trigger_ddl_commands Message-ID: References: <202106091355.sphciftmvqds@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2UK52S2EB1wOY/KZ" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --2UK52S2EB1wOY/KZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jun 11, 2021 at 11:00:40AM +0300, Aleksander Alekseev wrote: > The last argument should be `false` then. Hm, nope. I think that we had better pass true as argument here. First, this is more consistent with the identity lookup (OK, it does not matter as we would have discarded the object after the identity lookup anyway, but any future shuffling of this code may not be that wise). Second, now that I look at it, getObjectTypeDescription() can never be NULL as we have fallback names for relations, routines and constraints for all object types so the buffer will be filled with some data. Let's replace the bottom of getObjectTypeDescription() that returns now NULL by Assert(buffer.len > 0). This code is new as of v14, so it is better to adjust that sooner than later. -- Michael --2UK52S2EB1wOY/KZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmDDWOkACgkQnvQgOdby QH3MqRAAmaPJJOptj+mCzGCs34NL3yhjfun8fVTblKXc+0l0wosNfwzvTFlQKbuZ lnHKEjLvWS77+Sq9pb0D0TS7FOQCBCLAgPKdJE8BHkNKxyOET1GNZ/Lpwafffhkj pl5m4HqTi5C8RVhChic3STsudcGX5MogQGH+DJ4JW2mR/CNBcJMnPgPkDi871T5r jACLmfokGrS3iGg+jnQnVu+gAksh/Sjup1dgapwV6bXzF832ZXAWjKq9ji/pFU8x KZxt/b4pri6mXdIBOoX/QnsjdGNPUT6pgfuZmSRJX889cxIpqfBqKxHsaFHNgK5s sfhUWsixbOMa7a15ruFXwyXl7Ry9+cEJhOg8xEmSsLYPureMM4tkCwjh5pJRcwza Gpsy9AU6/euqZyy2A1gFaI3uXzSD/0ginkw9QihR3ZVNmNT1suFGdApfNaZY3xSE MJwtevIZF8KhpJFp8+tMdUV15oTRX8G4l+urEmm4liqOylnCa+SnS+rcbfdjzFbv l5sO+HKv1T6en1qGmkqKQCpXQAkrFqMW7UYs+sNlHwsm6KBUX2T+9OOJEb5diqYt Vu3o85Ie/fB5Jw98r8vA+klG+RRwjCxSXIEbYxDl8sxPkv4Wv5Fns1tw/mtJXVkd ZaqftAlbH074XkwVHz8eTYIw5POQ2Ee3YogYGbsZ3ASb6DOw7ps= =SVP/ -----END PGP SIGNATURE----- --2UK52S2EB1wOY/KZ--