pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Move CloneForeignKeyConstraints to tablecmds.c
2+ messages / 1 participants
[nested] [flat]

* pgsql: Move CloneForeignKeyConstraints to tablecmds.c
@ 2019-01-18 18:07  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2019-01-18 18:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Move CloneForeignKeyConstraints to tablecmds.c
@ 2019-01-18 18:07  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2019-01-18 18:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-01-18 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-01-18 18:07 pgsql: Move CloneForeignKeyConstraints to tablecmds.c Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-01-18 18:07 pgsql: Move CloneForeignKeyConstraints to tablecmds.c Alvaro Herrera <alvherre@alvh.no-ip.org>

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