Thread: Doc patch: mention indexes in pg_inherits docs

Doc patch: mention indexes in pg_inherits docs

From
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Hi Hackers,

When partitioned index support was added in veresion 11, the pg_inherits
docs missed the memo and still only say it describes table inheritance.
The attached patch adds mentions of indexes too, and notes that they can
not participate in multiple inheritance.

I don't know what the policy is on backpatching doc fixes, but
personally I think it should be.

- ilmari
-- 
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen

From 97f2b1508b0a2f6879b881e923b5a405dc28c3a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org>
Date: Fri, 17 Jul 2020 13:11:42 +0100
Subject: [PATCH] Mention that pg_inherit can also reference indexes

---
 doc/src/sgml/catalogs.sgml | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index a99c681887..26fda20d19 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -4417,9 +4417,9 @@
 
   <para>
    The catalog <structname>pg_inherits</structname> records information about
-   table inheritance hierarchies.  There is one entry for each direct
-   parent-child table relationship in the database.  (Indirect inheritance can be determined
-   by following chains of entries.)
+   table and index inheritance hierarchies.  There is one entry for each direct
+   parent-child table or index relationship in the database.  (Indirect
+   inheritance can be determined by following chains of entries.)
   </para>
 
   <table>
@@ -4443,7 +4443,7 @@
        (references <link
linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>)
       </para>
       <para>
-       The OID of the child table
+       The OID of the child table or index
       </para></entry>
      </row>
 
@@ -4453,7 +4453,7 @@
        (references <link
linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>)
       </para>
       <para>
-       The OID of the parent table
+       The OID of the parent table or index
       </para></entry>
      </row>
 
@@ -4465,6 +4465,10 @@
        If there is more than one direct parent for a child table (multiple
        inheritance), this number tells the order in which the
        inherited columns are to be arranged.  The count starts at 1.
+      </para>
+      <para>
+       Indexes can not have multiple inheritance, since they can only inherit
+       when using declarative partitioning.
       </para></entry>
      </row>
     </tbody>
-- 
2.27.0


Re: Doc patch: mention indexes in pg_inherits docs

From
Michael Paquier
Date:
On Tue, Jul 28, 2020 at 12:21:29PM +0100, Dagfinn Ilmari Mannsåker wrote:
> When partitioned index support was added in veresion 11, the pg_inherits
> docs missed the memo and still only say it describes table inheritance.
> The attached patch adds mentions of indexes too, and notes that they can
> not participate in multiple inheritance.

What you have here looks fine to me.  We could be more picky regarding
the types or relations that can be added, as it can actually be
possible to have a partitioned table or index, two relkinds of their
own, but what you are proposing looks fine enough here.

> I don't know what the policy is on backpatching doc fixes, but
> personally I think it should be.

This is actually a bug fix, because we include in the docs some
incorrect information, so it should be backpatched.  If there are no
objections, I'll take care of that.
--
Michael

Attachment

Re: Doc patch: mention indexes in pg_inherits docs

From
Michael Paquier
Date:
On Wed, Jul 29, 2020 at 03:06:58PM +0900, Michael Paquier wrote:
> This is actually a bug fix, because we include in the docs some
> incorrect information, so it should be backpatched.  If there are no
> objections, I'll take care of that.

And done.
--
Michael

Attachment

Re: Doc patch: mention indexes in pg_inherits docs

From
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Michael Paquier <michael@paquier.xyz> writes:

> On Wed, Jul 29, 2020 at 03:06:58PM +0900, Michael Paquier wrote:
>> This is actually a bug fix, because we include in the docs some
>> incorrect information, so it should be backpatched.  If there are no
>> objections, I'll take care of that.
>
> And done.

Thanks!

- ilmari
-- 
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen