Re: partitioned tables referenced by FKs

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-11-02T23:45:12Z
Lists: pgsql-hackers
Oh, I forgot to mention one thing.  When creating a constraint, an index
OID is normally given.  I'm not sure what is this for.  In the patch
it's a little convoluted to get the correct index OID, so I'm just
passing InvalidOid.  Things work nonetheless.  I wonder if we shouldn't
just do away with the index OID.  There are several /*FIXME*/ notes in
the code due to this.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Commits

  1. Support foreign keys that reference partitioned tables

  2. Fix partitioned index creation bug with dropped columns

  3. Improve psql's \d display of foreign key constraints

  4. Fix dependency recording bug for partitioned PKs

  5. Add index_get_partition convenience function

  6. Restore RI trigger sanity check

  7. Foreign keys on partitioned tables