diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2020-10-28 12:18:45 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2020-10-28 12:18:45 -0400 |
commit | 36b93121436cbbf357974144068c23bac75154fa (patch) | |
tree | cb9fcd10a3e29459e1f6aa30f56f5941f029c932 /src/backend/utils/cache/relcache.c | |
parent | ad1c36b0709e47cdb3cc4abd6c939fe64279b63f (diff) |
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
Diffstat (limited to 'src/backend/utils/cache/relcache.c')
-rw-r--r-- | src/backend/utils/cache/relcache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 9061af81a3e..9224e2ffeda 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -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 { |