Thread: pgsql: Refactor duplicate code into DeconstructFkConstraintRow

pgsql: Refactor duplicate code into DeconstructFkConstraintRow

From
Alvaro Herrera
Date:
Refactor duplicate code into DeconstructFkConstraintRow

My commit 3de241dba86f introduced some code (in tablecmds.c) to obtain
data from a pg_constraint row for a foreign key, that already existed in
ri_triggers.c.  Split it out into its own routine in pg_constraint.c,
where it naturally belongs.

No functional code changes, only code movement.

Backpatch to pg11, because a future bugfix is simpler after this.

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e974f223abb473ba62577261378ca740c641814f

Modified Files
--------------
src/backend/catalog/pg_constraint.c | 199 ++++++++++++++++++++----------------
src/backend/utils/adt/ri_triggers.c |  89 ++--------------
src/backend/utils/cache/relcache.c  |  61 +----------
src/include/catalog/pg_constraint.h |   3 +
4 files changed, 124 insertions(+), 228 deletions(-)