pgsql: Refactor duplicate code into DeconstructFkConstraintRow

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Refactor duplicate code into DeconstructFkConstraintRow
Date: 2019-01-18 18:07:28
Message-ID: E1gkYYC-0005HZ-Rk@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2019-01-18 20:05:02 Re: pgsql: Restrict the use of temporary namespace in two-phase transaction
Previous Message Tom Lane 2019-01-18 16:05:15 pgsql: Avoid sometimes printing both tables and their columns in DROP C