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