Modify fmgr so that internal name (compiler name) of a built-in
Tom Lane <tgl@sss.pgh.pa.us>
Modify fmgr so that internal name (compiler name) of a built-in function is found in prosrc field of pg_proc, not proname. This allows multiple aliases of a built-in to all be implemented as direct builtins, without needing a level of indirection through an SQL function. Replace existing SQL alias functions with builtin entries accordingly. Save a few K by not storing string names of builtin functions in fmgr's internal table (if you really want 'em, get 'em from pg_proc...). Update opr_sanity with a few more cross-checks.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/fmgr/fmgr.c | modified | +16 −14 |
| src/backend/utils/Gen_fmgrtab.sh.in | modified | +21 −18 |
| src/include/catalog/pg_proc.h | modified | +988 −990 |
| src/include/utils/fmgrtab.h | modified | +4 −4 |
| src/test/regress/expected/opr_sanity.out | modified | +108 −0 |
| src/test/regress/sql/opr_sanity.sql | modified | +86 −0 |