Re: docs about FKs referencing partitioned tables - Mailing list pgsql-hackers

From Amit Langote
Subject Re: docs about FKs referencing partitioned tables
Date
Msg-id 4cda4b9a-c421-4e87-b89f-a6e9c9352398@lab.ntt.co.jp
Whole thread Raw
In response to Re: docs about FKs referencing partitioned tables  (Paul A Jungwirth <pj@illuminatedcomputing.com>)
Responses Re: docs about FKs referencing partitioned tables  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Hi,

On 2019/05/29 14:01, Paul A Jungwirth wrote:
> On Sun, May 26, 2019 at 7:49 PM Michael Paquier <michael@paquier.xyz> wrote:
>> ...  However you are adding a paragraph for something which is
>> completely unrelated to the issue we are trying to fix.  If I were to
>> add something, I think that I would be more general than what you are
>> trying here and just mention a link to the previous paragraph about
>> the caveats of inheritance as they apply to single table members of an
>> inheritance tree and not a full set:
>> "Indexes and foreign key constraint apply to single tables and not
>> their inheritance children, hence they have some <link>caveats</> to
>> be aware of."
> 
> That seems reasonable to me. Here is a patch file if that is helpful
> (minor typo corrected).

The patch looks good, thanks.

Michael commented upthread that the new next might be repeating what's
already said elsewhere.  I did find that to be the case by looking at
5.10. Inheritance.  For example, 5.10.1. Caveats says exactly the same thing:

   A serious limitation of the inheritance feature is that indexes
   (including unique constraints) and foreign key constraints only apply
   to single tables, not to their inheritance children. This is true on
   both the referencing and referenced sides of a foreign key constraint.

But couple of other points mentioned in 5.11.3.3. Caveats (of 5.11. Table
Partitioning) are already repeated in 5.10.1. Caveats; for example, note
the point about VACUUM, ANALYZE, INSERT ON CONFLICT, etc. applying to
single tables.  So, perhaps it won't hurt to repeat the caveat about
indexes and foreign keys too.

Thanks,
Amit




pgsql-hackers by date:

Previous
From: Paul A Jungwirth
Date:
Subject: Re: docs about FKs referencing partitioned tables
Next
From: Kohei KaiGai
Date:
Subject: Re: How to know referenced sub-fields of a composite type?