1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

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
This commit is contained in:
Tom Lane
2020-10-28 12:18:45 -04:00
parent ad1c36b070
commit 36b9312143
3 changed files with 10 additions and 4 deletions

View File

@ -1761,7 +1761,7 @@ RelationInitTableAccessMethod(Relation relation)
* seem prudent to show that in the catalog. So just overwrite it
* here.
*/
relation->rd_amhandler = HEAP_TABLE_AM_HANDLER_OID;
relation->rd_amhandler = F_HEAP_TABLEAM_HANDLER;
}
else if (IsCatalogRelation(relation))
{
@ -1769,7 +1769,7 @@ RelationInitTableAccessMethod(Relation relation)
* Avoid doing a syscache lookup for catalog tables.
*/
Assert(relation->rd_rel->relam == HEAP_TABLE_AM_OID);
relation->rd_amhandler = HEAP_TABLE_AM_HANDLER_OID;
relation->rd_amhandler = F_HEAP_TABLEAM_HANDLER;
}
else
{