Re: Add primary keys to system catalogs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Add primary keys to system catalogs
Date
Msg-id 346555.1610994782@sss.pgh.pa.us
Whole thread Raw
In response to Re: Add primary keys to system catalogs  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Add primary keys to system catalogs  ("Joel Jacobson" <joel@compiler.org>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: schema variables
Next
From: Tom Lane
Date:
Subject: Re: search_plan_tree(): handling of non-leaf CustomScanState nodes causes segfault