pgsql: Support foreign keys that reference partitioned tables
От | Alvaro Herrera |
---|---|
Тема | pgsql: Support foreign keys that reference partitioned tables |
Дата | |
Msg-id | E1hBk2b-0002s6-N5@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Support foreign keys that reference partitioned tables Previously, while primary keys could be made on partitioned tables, it was not possible to define foreign keys that reference those primary keys. Now it is possible to do that. Author: Álvaro Herrera Reviewed-by: Amit Langote, Jesper Pedersen Discussion: https://postgr.es/m/20181102234158.735b3fevta63msbj@alvherre.pgsql Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/f56f8f8da6afd8523b4d5284e02a20ed2b33ef8d Modified Files -------------- doc/src/sgml/ref/create_table.sgml | 7 +- src/backend/commands/tablecmds.c | 1342 ++++++++++++++++------ src/backend/utils/adt/ri_triggers.c | 263 ++++- src/backend/utils/adt/ruleutils.c | 18 + src/bin/psql/describe.c | 7 +- src/include/commands/tablecmds.h | 4 - src/include/commands/trigger.h | 2 + src/include/utils/ruleutils.h | 1 + src/test/isolation/expected/fk-partitioned-1.out | 133 +++ src/test/isolation/expected/fk-partitioned-2.out | 70 ++ src/test/isolation/isolation_schedule | 2 + src/test/isolation/specs/fk-partitioned-1.spec | 45 + src/test/isolation/specs/fk-partitioned-2.spec | 29 + src/test/regress/expected/foreign_key.out | 334 +++++- src/test/regress/sql/foreign_key.sql | 213 +++- 15 files changed, 2039 insertions(+), 431 deletions(-)
В списке pgsql-committers по дате отправления: