pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Support foreign keys that reference partitioned tables
Date: Wed, 03 Apr 2019 17:51:13 +0000
Message-ID: <E1hBk2b-0002s6-N5@gemulon.postgresql.org> (raw)

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



Message-ID: <E1hBk2b-0002s6-N5@gemulon.postgresql.org>
Permalink:  ../E1hBk2b-0002s6-N5@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hBk2b-0002s6-N5@gemulon.postgresql.org

 · 

reply

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: Support foreign keys that reference partitioned tables
  In-Reply-To: <E1hBk2b-0002s6-N5@gemulon.postgresql.org>
  References: <E1hBk2b-0002s6-N5@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