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 1l2Uah-00066B-27 for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Jan 2021 07:41:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2Uaf-0004T6-Oi for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Jan 2021 07:41:13 +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 1l2Uaf-0004Sy-Hk for pgsql-hackers@lists.postgresql.org; Thu, 21 Jan 2021 07:41:13 +0000 Received: from wforward1-smtp.messagingengine.com ([64.147.123.30]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2Uad-000242-5r for pgsql-hackers@postgresql.org; Thu, 21 Jan 2021 07:41:12 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.west.internal (Postfix) with ESMTP id 42F49404; Thu, 21 Jan 2021 02:41:07 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 21 Jan 2021 02:41:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=D+qYOxxGn5/HL3Wfawoq0RRm/82GkP6+JqGcHzbcI bY=; b=VkfCeAjWwIdFdVT/9TW6CSGcjHacFp9hN1MabKLPjVdKl+/B2R0WV7yVg 57WROta683S5iW8p3HH2THuwH8Ujuoqf+mGqhIqFXK8zyYPOBFnhDx6V2t5BNdQJ VSZxKfHbAsa9jKkrL0WqXkUeSzHtM0fNbY9sI7ZYVMsw1wyp/qj3H4TrDnDoylz7 sjocieY+4da6ArBo2ydOzNAnFFiz0Rnc1yWBr8+NQJX0QfGT2lroXc2WexDy29gE yNbydTzt+95d2B3FlPvFl2nZfBSXNNdqT6DUQP7J4qsfolo9CXhyGWZyzw8ciy3H BU3pfvBg5Q4UBTIEZr5GVfH+TbxoA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudefgddutdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvdhnug hquhgrughrrghnthdrtghomheqnecuggftrfgrthhtvghrnheptdevgeehtdejvdevvdel jeeuveejjedtleelgfekleefieekjeelgfektdduuedvnecuffhomhgrihhnpedvnhguqh hurggurhgrnhhtrdgtohhmnecukfhppeekjedrudejjedrjedvrddugedvnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghish gvnhhtrhgruhhtsedvnhguqhhurggurhgrnhhtrdgtohhm X-ME-Proxy: Received: from april.pezone.net (p57b1488e.dip0.t-ipconnect.de [87.177.72.142]) by mail.messagingengine.com (Postfix) with ESMTPA id 91987240065; Thu, 21 Jan 2021 02:41:05 -0500 (EST) Subject: Re: Add primary keys to system catalogs To: Tom Lane , Robert Haas References: <343866.1610990591@sss.pgh.pa.us> Cc: Craig Ringer , Peter Eisentraut , pgsql-hackers , Joel Jacobson From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <37c18f90-fd2a-993f-0527-1a06049ab8bb@2ndquadrant.com> Date: Thu, 21 Jan 2021 08:41:04 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <343866.1610990591@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2021-01-18 18:23, Tom Lane wrote: > The reason I got interested in this right now is the nearby > discussion [1] about why findoidjoins misses some catalog > relationships and whether we should fix that and/or make its results > more readily accessible. I'd thought perhaps FK constraint entries > could supersede the need for that tool altogether, but now it seems > like not. Yes, catalog consistency checking was also something I had in mind. There are clearly a number of complications still to resolve. But in general the idea of representing relationships between tables in the DDL/schema sounds like a sensible idea. -- Peter Eisentraut 2ndQuadrant, an EDB company https://www.2ndquadrant.com/