summaryrefslogtreecommitdiff
path: root/src/include/commands/tablecmds.h
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2019-01-18 14:49:27 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2019-01-18 14:57:49 -0300
commitfca6cabed17c4960224408d44e3d384b560b78f5 (patch)
tree54fc485341bac9557e85bb1e67bf7a86db964903 /src/include/commands/tablecmds.h
parente974f223abb473ba62577261378ca740c641814f (diff)
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.
Diffstat (limited to 'src/include/commands/tablecmds.h')
-rw-r--r--src/include/commands/tablecmds.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/commands/tablecmds.h b/src/include/commands/tablecmds.h
index 138de84e832..ac93bd3de84 100644
--- a/src/include/commands/tablecmds.h
+++ b/src/include/commands/tablecmds.h
@@ -78,6 +78,8 @@ extern void check_of_type(HeapTuple typetuple);
extern void createForeignKeyTriggers(Relation rel, Oid refRelOid,
Constraint *fkconstraint, Oid constraintOid,
Oid indexOid, bool create_action);
+extern void CloneForeignKeyConstraints(Oid parentId, Oid relationId,
+ List **cloned);
extern void register_on_commit_action(Oid relid, OnCommitAction action);
extern void remove_on_commit_action(Oid relid);