pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Don't use custom OID symbols in pg_proc.dat. 2+ messages / 1 participants [nested] [flat]
* pgsql: Don't use custom OID symbols in pg_proc.dat. @ 2020-10-28 16:18 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2020-10-28 16:18 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Don't use custom OID symbols in pg_proc.dat. We have a perfectly good convention for OID macros for built-in functions already, so making custom symbols is just introducing unnecessary deviation from the convention. Remove the one case that had snuck in, and add an error check in genbki.pl to discourage future instances. Although this touches pg_proc.dat, there's no need for a catversion bump since the actual catalog data isn't changed. John Naylor Discussion: https://postgr.es/m/CAFBsxsHpCbjfoddNGpnnnY5pHwckWfiYkMYSF74PmP1su0+ZOw@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/36b93121436cbbf357974144068c23bac75154fa Modified Files -------------- src/backend/catalog/genbki.pl | 7 +++++++ src/backend/utils/cache/relcache.c | 4 ++-- src/include/catalog/pg_proc.dat | 3 +-- 3 files changed, 10 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Don't use custom OID symbols in pg_type.dat, either. @ 2020-10-29 17:33 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2020-10-29 17:33 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/f90149e6285aaae6b48559afce1bd638ee26c33e Modified Files -------------- src/backend/bootstrap/bootstrap.c | 2 +- src/backend/catalog/genbki.pl | 8 ++++++-- src/backend/commands/event_trigger.c | 2 +- src/backend/utils/misc/pg_controldata.c | 10 +++++----- src/fe_utils/print.c | 2 +- src/include/catalog/pg_type.dat | 30 ++++++++++-------------------- src/include/catalog/pg_type.h | 7 +++++++ src/interfaces/ecpg/ecpglib/execute.c | 2 +- src/pl/plperl/plperl.c | 4 ++-- src/pl/plpgsql/src/pl_comp.c | 2 +- src/pl/plpgsql/src/pl_handler.c | 2 +- src/pl/plpython/plpy_procedure.c | 2 +- src/pl/tcl/pltcl.c | 2 +- 13 files changed, 38 insertions(+), 37 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-10-29 17:33 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-10-28 16:18 pgsql: Don't use custom OID symbols in pg_proc.dat. Tom Lane <tgl@sss.pgh.pa.us> 2020-10-29 17:33 pgsql: Don't use custom OID symbols in pg_type.dat, either. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox