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 1kmt74-000894-W3 for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Dec 2020 06:38: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 1kmt72-0002po-MQ for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Dec 2020 06:38:08 +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 1kmt72-0002ph-GC for pgsql-hackers@lists.postgresql.org; Wed, 09 Dec 2020 06:38:08 +0000 Received: from [66.111.4.26] (helo=out2-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmt70-0004mR-7p for pgsql-hackers@postgresql.org; Wed, 09 Dec 2020 06:38:08 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 166595C019F; Wed, 9 Dec 2020 01:37:55 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 09 Dec 2020 01:37:55 -0500 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=fm3; bh=3iZzXzldddjpDEOdLwA9GVaoLY1 P5glCILkXZrt7IGY=; b=HmSbkBQzvWOg8QmT+NKiRI4SHoPfCSK2lPAYQ71LcO1 uVP20bXpM52i/A35zxAQe+lN5alt4nL2ZMih/y8DzDCsRug7qQ45yJm+BrJEaADr TRuEvwKqo/kiVH+FvHm93ntKhpON1x4wD9vxd2Wpe/oeZuNQZcLwK32KP8GOoUix DGxu47OTuOep/5VaqfkDacu/2aqN39ocOsWEjy2RultK7rtNd6IlNBltAAIjPsgD iwxv+NidZqWcLt0hEmwSKgm4Ina47ru9JPVgCXtB/OUs2PUEsRpN0P96BRSN60Vr p+RsJbEVMEqv+oG39inzcpYmAUVUVWQpr7HkGRbCrEg== 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=fm1; bh=3iZzXz ldddjpDEOdLwA9GVaoLY1P5glCILkXZrt7IGY=; b=E5NIDbJ8Rv/+8kZlxE/bVV VaNRA6OmGMitwx7nfxs+M74F/mPbTreZcXrQULjm5HUwQA6W+oUBD6YWDBaLzXk8 RDrRy2hBSoO9UF58bS/Qy9Vxqvj/2ba2dEXW0+Kqocpy5AVLpN8kOWY68yZBBD82 GET0K0k5yv/APZRMqZZ7km0hmt27Pr3TBscFBreTWBjtgw8u30S3UwDdMCUHdHMZ 0RD5rDsHKpV7Weyp16SGH1hgbbXhHCY99vjfLBbn2jorwoKUlJwOo0kb4qjRIEsM 13YZzXkd8DykmOyp5pj5rkcGhARdplxIu1KNIuDjkWHBfhvpgGjVQLLD92jrDtNQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudejjedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 48912240066; Wed, 9 Dec 2020 01:37:53 -0500 (EST) Date: Wed, 9 Dec 2020 15:37:50 +0900 From: Michael Paquier To: Tom Lane Cc: Matthias van de Meent , Peter Eisentraut , pgsql-hackers Subject: Re: get_constraint_index() and conindid Message-ID: References: <4688d55c-9a2e-9a5a-d166-5f24fe0bf8db@enterprisedb.com> <3260997.1607452119@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VoBL+xf//iU561Q4" Content-Disposition: inline In-Reply-To: <3260997.1607452119@sss.pgh.pa.us> X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.26 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --VoBL+xf//iU561Q4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 08, 2020 at 01:28:39PM -0500, Tom Lane wrote: > Matthias van de Meent writes: >> On Mon, 7 Dec 2020 at 11:09, Peter Eisentraut >> wrote: >>> get_constraint_index() does its work by going through pg_depend. It was >>> added before pg_constraint.conindid was added, and some callers are >>> still not changed. Are there reasons for that? Probably not. The >>> attached patch changes get_constraint_index() to an lsyscache-style >>> lookup instead. >=20 >> This looks quite reasonable, and it passes "make installcheck-world". >=20 > +1, LGTM. Nice cleanup! >> Only thing I could think of is that it maybe could use a (small) >> comment in the message on that/why get_constraint_index is moved to >> utils/lsyscache from catalog/dependency, as that took me some time to >> understand. >=20 > commit message could reasonably say that maybe, but I don't think we > need to memorialize it in a comment. lsyscache.c *is* where one > would expect to find a simple catalog-field-fetch function like this. > The previous implementation was not that, so it didn't belong there. Agreed. -- Michael --VoBL+xf//iU561Q4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl/QcL4ACgkQnvQgOdby QH2+Uw/+JZVJTeGTZUEit0mlWP7LpbZ39V18nonGI9v/hWnuXHMPnhUlCGG+8diX ZfwObRmZmTtAjYLuJcyBcBANKY6SjdH6deZa0hPmEK0o4JJt+sw8VbRzj7XqwjmR DPrMDsJJVb69mSPccp7Tb+VhhfqIDdvLERl49kdwLJgzQv/C3gvs3FPL3QFA8heH p3iQnVf/RDQ1nB2vrMfWP87GQRTf7npmSUmWdpPtyBKHWdsXx4CWdbxmXXSYlQ0+ 32vcn2IGlrszPafNTV2quqJBxgFTZFQ8Hx+JMMBwy2Wm5Te3ntY0ID+AHn4O3kad FXQCoCi99S3ONjwdsqDFRszNQ2/adA4xbcBc+KpTaubntyVhO+AIXNRCBxmAPYwo mhVbK1cfFUyNvDgWxjJS46TeFLlf9WI+Qn9lbszgnyA5p0eFiNCpc+4d1/Q0Jx2d MqM60Ip0xcOoRaREKdJEAhtkByvvZe/8YjDRRtvIHZ4qjEkXZ/MgaKD4bggLbDso lngkcGDPRorkVuNdBoHravtbWi+lFeHJ2AOQJ5OZqatSB/rLsqa8JHnrK/rtV8gF ccWpkp+BvOpqd/SLFvHiJ0fIB6r6yAsz/Pb1MllzhmulyWzeo9JlpJxlplrB5DgF aMgTfNlwJlO1/72eAexfxkqDISeGsAhvg7j/mf4cXRPMofjdJh0= =ljeI -----END PGP SIGNATURE----- --VoBL+xf//iU561Q4--