Don't use custom OID symbols in pg_type.dat, either.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 29 Oct 2020 17:33:38 +0000 (13:33 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 29 Oct 2020 17:33:38 +0000 (13:33 -0400)
commitf90149e6285aaae6b48559afce1bd638ee26c33e
tree5a5294c65b534466aca74db0de2b8fd9f9a8b964
parent1c7675a7a4265064a2c8e1ed02b2c042c2521664
Don't use custom OID symbols in pg_type.dat, either.

On the same reasoning as in commit 36b931214, forbid using custom
oid_symbol macros in pg_type as well as pg_proc, so that we always
rely on the predictable macro names generated by genbki.pl.

We do continue to grant grandfather status to the names CASHOID and
LSNOID, although those are now considered deprecated aliases for the
preferred names MONEYOID and PG_LSNOID.  This is because there's
likely to be client-side code using the old names, and this bout of
neatnik-ism doesn't quite seem worth breaking client code.

There might be a case for grandfathering EVTTRIGGEROID, too, since
externally-maintained PLs may reference that symbol.  But renaming
such references to EVENT_TRIGGEROID doesn't seem like a particularly
heavy lift --- we make far more significant backend API changes in
every major release.  For now I didn't add that, but we could
reconsider if there's pushback.

The other names changed here seem pretty unlikely to have any outside
uses.  Again, we could add alias macros if there are complaints, but
for now I didn't.

As before, no need for a catversion bump.

John Naylor

Discussion: https://postgr.es/m/CAFBsxsHpCbjfoddNGpnnnY5pHwckWfiYkMYSF74PmP1su0+ZOw@mail.gmail.com
13 files changed:
src/backend/bootstrap/bootstrap.c
src/backend/catalog/genbki.pl
src/backend/commands/event_trigger.c
src/backend/utils/misc/pg_controldata.c
src/fe_utils/print.c
src/include/catalog/pg_type.dat
src/include/catalog/pg_type.h
src/interfaces/ecpg/ecpglib/execute.c
src/pl/plperl/plperl.c
src/pl/plpgsql/src/pl_comp.c
src/pl/plpgsql/src/pl_handler.c
src/pl/plpython/plpy_procedure.c
src/pl/tcl/pltcl.c