On Thu, Oct 12, 2023 at 3:36 PM David G. Johnston <david.g.johns...@gmail.com> wrote: > Every catalog has both a natural and a surrogate key. Developers get to use > the surrogate key while end-users get to use the natural one (i.e., the one > they provided). I see no reason to change that specification.
I agree with this. > And I do believe there are no compelling reasons for an end-user to need to > use the surrogate key instead of the natural one. But I disagree with this. > The example provided by the OP isn't one, IMO, the overall goal can be > accomplished via the natural key (if it cannot, maybe we need to make > retrieving the natural key for a pg_proc record given an OID easier). The > fact that OIDs are not even accessible via SQL further reinforces this > belief. The only reason to need OIDs as a DBA is to perform joins among the > catalogs and all such joins are local to the database and even session > executing them - the specific values are immaterial. This just all seems very simplistic to me. In theory it's true, but in practice it isn't. -- Robert Haas EDB: http://www.enterprisedb.com