From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Move CloneForeignKeyConstraints to tablecmds.c
Date: Fri, 18 Jan 2019 18:07:28 +0000
Message-ID: <E1gkYYC-0005Hb-Rt@gemulon.postgresql.org> (raw)
Move CloneForeignKeyConstraints to tablecmds.c
My commit 3de241dba86f introduced some code to create a clone of a
foreign key to a partition, but I put it in pg_constraint.c because it
was too close to the contents of the pg_constraint row. With the
previous commit that split out the constraint tuple deconstruction into
its own routine, it makes more sense to have the FK-cloning function in
tablecmds.c, mostly because its static subroutine can then be used by a
future bugfix.
My initial posting of this patch had this routine as static in
tablecmds.c, but sadly this function is already part of the Postgres 11
ABI as exported from pg_constraint.c, so keep it as exported also just
to avoid breaking any possible users of it.
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/fca6cabed17c4960224408d44e3d384b560b78f5
Modified Files
--------------
src/backend/catalog/pg_constraint.c | 302 -----------------------------------
src/backend/commands/tablecmds.c | 305 ++++++++++++++++++++++++++++++++++++
src/include/catalog/pg_constraint.h | 3 -
src/include/commands/tablecmds.h | 2 +
4 files changed, 307 insertions(+), 305 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org
Subject: Re: pgsql: Move CloneForeignKeyConstraints to tablecmds.c
In-Reply-To: <E1gkYYC-0005Hb-Rt@gemulon.postgresql.org>
References: <E1gkYYC-0005Hb-Rt@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox