From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Set pg_class.relhassubclass for partitioned indexes
Date: Mon, 22 Oct 2018 13:35:42 +0900
Message-ID: <20181022043542.GA17163@paquier.xyz> (raw)
In-Reply-To: <82549.1540178404@sss.pgh.pa.us>
References: <E1gEPd3-0007fj-6U@gemulon.postgresql.org>
<82470.1540177167@sss.pgh.pa.us>
<20181022031212.GF14282@paquier.xyz>
<82549.1540178404@sss.pgh.pa.us>
On Sun, Oct 21, 2018 at 11:20:04PM -0400, Tom Lane wrote:
> Michael Paquier <michael@paquier.xyz> writes:
>> On Sun, Oct 21, 2018 at 10:59:27PM -0400, Tom Lane wrote:
>>> Seems like this commit should have touched the catalogs.sgml description
>>> for that column, as well as the pg_class.h comment for it. Neither of
>>> those are worded in a way that suggests it could be set for non-table
>>> relations.
>
>> The pg_class.h comment looked fine for me first. How would you reword
>> it?
>
> Well, the question is what "derived class" means, but I'd tend to think
> it means something that has an associated composite type; which indexes
> do not. So maybe instead of "has (or has had) derived classes", we could
> write "has (or has had) child tables or indexes"? I'm not wedded to
> particular wording for this, but I think what's there now is a bit
> misleading.
Your suggestion looks good to me.
>> relispartition tells "True if table is a partition", which is not
>> actually true as it can apply to indexes. So this should be changed in
>> v11 as well, no?
>
> Good point, that column's description is obsolete as well.
Amit, Tom, what do you think about the attached? This merges all the
things proposed.
--
Michael
Attachments:partition-docs-v2.patch (text/x-diff, 1.7K) downloaddiff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgmlindex 6d6fbecd12..9edba96fab 100644--- a/doc/src/sgml/catalogs.sgml+++ b/doc/src/sgml/catalogs.sgml@@ -1900,7 +1900,9 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<entry><structfield>relhassubclass</structfield></entry>
<entry><type>bool</type></entry>
<entry></entry>
- <entry>True if table has (or once had) any inheritance children</entry>+ <entry>+ True if table or index has (or once had) any inheritance children+ </entry>
</row>
<row>
@@ -1948,7 +1950,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<entry><structfield>relispartition</structfield></entry>
<entry><type>bool</type></entry>
<entry></entry>
- <entry>True if table is a partition</entry>+ <entry>True if table or index is a partition</entry>
</row>
<row>
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.hindex dc6c415c58..788d7a31dc 100644--- a/src/include/catalog/pg_class.h+++ b/src/include/catalog/pg_class.h@@ -60,7 +60,7 @@ CATALOG(pg_class,1259,RelationRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83,Relat
bool relhasoids; /* T if we generate OIDs for rows of rel */
bool relhasrules; /* has (or has had) any rules */
bool relhastriggers; /* has (or has had) any TRIGGERs */
- bool relhassubclass; /* has (or has had) derived classes */+ bool relhassubclass; /* has (or has had) child tables or indexes */
bool relrowsecurity; /* row security is enabled or not */
bool relforcerowsecurity; /* row security forced for owners or
* not */
signature.asc (application/pgp-signature, 832B) download
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, Langote_Amit_f8@lab.ntt.co.jp, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Set pg_class.relhassubclass for partitioned indexes
In-Reply-To: <20181022043542.GA17163@paquier.xyz>
* 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