Change get_constraint_index() to use pg_constraint.conindid
Peter Eisentraut <peter@eisentraut.org>
Change get_constraint_index() to use pg_constraint.conindid It was still using a scan of pg_depend instead of using the conindid column that has been added since. Since it is now just a catalog lookup wrapper and not related to pg_depend, move from pg_depend.c to lsyscache.c. Reviewed-by: Matthias van de Meent <boekewurm+postgres@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/flat/4688d55c-9a2e-9a5a-d166-5f24fe0bf8db%40enterprisedb.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/pg_depend.c | modified | +0 −69 |
| src/backend/commands/tablecmds.c | modified | +0 −1 |
| src/backend/optimizer/util/plancat.c | modified | +0 −1 |
| src/backend/utils/adt/ruleutils.c | modified | +1 −2 |
| src/backend/utils/cache/lsyscache.c | modified | +27 −0 |
| src/include/catalog/dependency.h | modified | +0 −2 |
| src/include/utils/lsyscache.h | modified | +1 −0 |
Discussion
- get_constraint_index() and conindid 5 messages · 2020-12-07 → 2020-12-09