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 1l1ZL5-000665-Av for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Jan 2021 18:33:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l1ZL2-0006SU-KE for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Jan 2021 18:33:16 +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 1l1ZL2-0006SJ-DU for pgsql-hackers@lists.postgresql.org; Mon, 18 Jan 2021 18:33:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1ZKv-0004om-FO for pgsql-hackers@postgresql.org; Mon, 18 Jan 2021 18:33:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 10IIX2Cj346556; Mon, 18 Jan 2021 13:33:02 -0500 From: Tom Lane To: "Joel Jacobson" cc: Robert Haas , Craig Ringer , Peter Eisentraut , pgsql-hackers Subject: Re: Add primary keys to system catalogs In-reply-to: <343866.1610990591@sss.pgh.pa.us> References: <343866.1610990591@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 18 Jan 2021 12:23:11 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <346554.1610994782.1@sss.pgh.pa.us> Date: Mon, 18 Jan 2021 13:33:02 -0500 Message-ID: <346555.1610994782@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > ... I still like the idea of marking OID relationships in the > catalog headers though. Perhaps we should take Joel's suggestion > of a new system catalog more seriously, and have genbki.pl populate > such a catalog from info in the catalog header files. On second thought, a catalog is overkill; it'd only be useful if the data could change after initdb, which this data surely cannot. The right way to expose such info to SQL is with a set-returning function reading a constant table in the C code, a la pg_get_keywords(). That way takes a whole lot less infrastructure and is just as useful to SQL code. [ wanders away wondering about a debug mode in which we actually validate OIDs inserted into such columns... ] regards, tom lane