pgsql: Refactor duplicate code into DeconstructFkConstraintRow - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: Refactor duplicate code into DeconstructFkConstraintRow
Date
Msg-id E1gkYYC-0005HZ-Rk@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Avoid sometimes printing both tables and their columns in DROPC
Next
From: Tom Lane
Date:
Subject: pgsql: Use our own getopt() on OpenBSD.