From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Move CloneForeignKeyConstraints to tablecmds.c |
Date: | 2019-01-18 18:07:28 |
Message-ID: | E1gkYYC-0005HV-RM@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/03afae201f0a0762bb66cf02e038ed0d982ad048
Modified Files
--------------
src/backend/catalog/pg_constraint.c | 304 -----------------------------------
src/backend/commands/tablecmds.c | 306 ++++++++++++++++++++++++++++++++++++
src/include/catalog/pg_constraint.h | 3 -
3 files changed, 306 insertions(+), 307 deletions(-)
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 |