Re: clean up docs for v12

From: Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: clean up docs for v12
Date: 2019-05-21 04:25:39
Message-ID: CA+renyVCmJ0hoVNdDoEv1O3CDwiV0QWWEwZNL9JDSDy0vuXsSA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

I'm sorry if this is the wrong place for this or it's already been
covered (I did scan though this whole thread and a couple others), but
I noticed the docs at
https://www.postgresql.org/docs/devel/ddl-partitioning.html still say
you can't create a foreign key referencing a partitioned table, even
though the docs for
https://www.postgresql.org/docs/devel/sql-createtable.html have been
updated (compared to v11). My understanding is that foreign keys
*still* don't work as expected when pointing at traditional INHERITS
tables, but they *will* work with declaratively-partitioned tables. In
that case I suggest this change:

diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index a0a7435a03..3b4f43bbad 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -3966,14 +3966,6 @@ ALTER TABLE measurement ATTACH PARTITION
measurement_y2008m02

- <listitem>
- <para>
- While primary keys are supported on partitioned tables, foreign
- keys referencing partitioned tables are not supported. (Foreign key
- references from a partitioned table to some other table are supported.)
- </para>
- </listitem>
-
<listitem>
<para>
<literal>BEFORE ROW</literal> triggers, if necessary, must be defined
on individual partitions, not the partitioned table.
</para>
@@ -4366,6 +4358,14 @@ ALTER TABLE measurement_y2008m02 INHERIT measurement;
</para>
</listitem>

+ <listitem>
+ <para>
+ While primary keys are supported on inheritance-partitioned
tables, foreign
+ keys referencing these tables are not supported. (Foreign key
+ references from an inheritance-partitioned table to some other
table are supported.)
+ </para>
+ </listitem>
+
<listitem>
<para>
If you are using manual <command>VACUUM</command> or

(I've also attached it as a patch file.) In other words, we should
move this caveat from the section on declaratively-partitioned tables
to the section on inheritance-partitioned tables.

Sorry again if this is the wrong conversation for this!

Yours,
Paul

Attachment Content-Type Size
inheritance_fk_docs_v0001.patch application/octet-stream 1.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2019-05-21 04:35:50 Re: clean up docs for v12
Previous Message Michael Paquier 2019-05-21 04:18:03 Re: Caveats from reloption toast_tuple_target