Add a "provariadic" column to pg_proc to eliminate the remarkably expensive
Tom Lane <tgl@sss.pgh.pa.us>
Add a "provariadic" column to pg_proc to eliminate the remarkably expensive need to deconstruct proargmodes for each pg_proc entry inspected by FuncnameGetCandidates(). Fixes function lookup performance regression caused by yesterday's variadic-functions patch. In passing, make pg_proc.probin be NULL, rather than a dummy value '-', in cases where it is not actually used for the particular type of function. This should buy back some of the space cost of the extra column.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/catalogs.sgml | modified | +9 −1 |
| src/backend/catalog/namespace.c | modified | +11 −38 |
| src/backend/catalog/pg_aggregate.c | modified | +2 −2 |
| src/backend/catalog/pg_proc.c | modified | +67 −5 |
| src/backend/commands/functioncmds.c | modified | +29 −27 |
| src/backend/utils/adt/ruleutils.c | modified | +7 −24 |
| src/backend/utils/fmgr/fmgr.c | modified | +6 −4 |
| src/bin/pg_dump/pg_dump.c | modified | +6 −4 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/catalog/pg_attribute.h | modified | +33 −31 |
| src/include/catalog/pg_class.h | modified | +2 −2 |
| src/include/catalog/pg_proc.h | modified | +2101 −2099 |
| src/test/regress/expected/opr_sanity.out | modified | +23 −0 |
| src/test/regress/sql/opr_sanity.sql | modified | +14 −0 |