Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gERwg-0007io-0N for pgsql-committers@arkaria.postgresql.org; Mon, 22 Oct 2018 04:36:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gERwd-0001MU-Ox for pgsql-committers@arkaria.postgresql.org; Mon, 22 Oct 2018 04:35:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gERwc-0001MN-27 for pgsql-committers@lists.postgresql.org; Mon, 22 Oct 2018 04:35:59 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gERwV-0006lL-JV for pgsql-committers@lists.postgresql.org; Mon, 22 Oct 2018 04:35:57 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 9B2F38DC; Mon, 22 Oct 2018 00:35:47 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 22 Oct 2018 00:35:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=iA6zbLKj42qWJ64Rg8jUXkHDyza u7tsn2rLJU7bS+zM=; b=gs1RfgpTw/7QzHaxTXsz9auQMl42MkE274nuIPl3tOW 5dO8md6E+sV2kdFlZSOmQeSWV41M5Z32hS29aK5FJLHf1sRERom8h5xK8+zDjgUV 4nsi5EMSy7zJRT90Vk6S8kXeTipmpGKk0QM77J3/ABFgElwmzwNTaIrr0t04lGld NOkhjXfSNNhA7uGCMYqCTAvd7LvxcB8VGS1HTbZSBPNtceQm0QiHEhPg+NfEVNb7 seqpjRHN3fGy0R8Ej5Pdvtcf1NPv10VuOp68KXsSiE1Zv00JTr/gBCv580X7Gez4 YpA945qDJVI4fIQfWGd12DGcuzEFB8yWCeIwhFNewoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=iA6zbL Kj42qWJ64Rg8jUXkHDyzau7tsn2rLJU7bS+zM=; b=pv0WqE+TZRKKHGzSnK+XRZ 9PEhjoKjOdok4pFVyODNwp2RakAN7MowaGAmborrB+uGcgAW27L6YMKpaSv9+mrr KYOFYn+crbAPKNsUtlh6GBGfhSBeZ6b3l+yoq/YSv2S/+jh+177ScvHPi7mU566R zFCqZJ7dNaRkzRYIiVkY3+e9e2j55VXnVK/nr40Z+n/bwsTgsXkHVAjJ1UXDPz+P deNYZMXRaVmRZwuZdlzXE6qWXN5e2PBOPUnZeu0VixkqYZmWzgvHBIqDvQiD9D5k 1ij9aVrFV69z4QoJu5I4sKKpumf/iL/JlsJa6aCnmPv3N/NzhmypObWKdWvjq8Fw == X-ME-Sender: X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 26F5DE405D; Mon, 22 Oct 2018 00:35:44 -0400 (EDT) Date: Mon, 22 Oct 2018 13:35:42 +0900 From: Michael Paquier To: Tom Lane , Amit Langote Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Set pg_class.relhassubclass for partitioned indexes Message-ID: <20181022043542.GA17163@paquier.xyz> References: <82470.1540177167@sss.pgh.pa.us> <20181022031212.GF14282@paquier.xyz> <82549.1540178404@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oLBj+sq0vYjzfsbl" Content-Disposition: inline In-Reply-To: <82549.1540178404@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --oLBj+sq0vYjzfsbl Content-Type: multipart/mixed; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 21, 2018 at 11:20:04PM -0400, Tom Lane wrote: > Michael Paquier 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. >=20 >> The pg_class.h comment looked fine for me first. How would you reword >> it? >=20 > 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? >=20 > 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 --yrj/dFKFPuw6o+aM Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="partition-docs-v2.patch" Content-Transfer-Encoding: quoted-printable diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 6d6fbecd12..9edba96fab 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -1900,7 +1900,9 @@ SCRAM-SHA-256$<iteration count>:&l relhassubclass bool - True if table has (or once had) any inheritance children + + True if table or index has (or once had) any inheritance children + =20 @@ -1948,7 +1950,7 @@ SCRAM-SHA-256$<iteration count>:&l relispartition bool - True if table is a partition + True if table or index is a partition =20 diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h index 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 B= KI_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 */ --yrj/dFKFPuw6o+aM-- --oLBj+sq0vYjzfsbl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlvNU54ACgkQnvQgOdby QH3l6A/+IaLb6UgRp9h2MMm4Fh3ugoTTgAJdQzndHFhjABS3XBnbamlUTKk4pJU5 XeOPd6DXC9Pdp+jdqztKQ6CYdctZzjampa5t2kdQWWLhsqPnKOAMrUI1B5vcAvGo zWWqu4PuPsyqQr+XSAdmceM6KzuJVcu7gkwY9Ucsq6sKeKH4W7J6hdM7l2nL/esv /g+NWqPEOs1OvFznFk8WBkIp4hiMxVww1WZTMO+/ACU52wAUusaiDSyuAJ9dBaDZ uXpu+v69hGbIVBIIgid2cgQbUATT3T8VABnh5C5NLQFy5UKExCy0MlvZb7brlTVX 3TYCDjMbuSSZpKWBTy11Lbr5gk5AXgNGW9tUKwL1rsvEy+6kr/PYC+goPPv9+hzP ugOQaOL7iiYXj2+eRkENEPDryYx53feVI3toSWU4b8eAlUFoXfW3s4lQXQrMrkeP t/M71RmnFkeey/jdz7Cnjve+Us0RSJibzzp5zzQZg5pCmt/IEGlz/QK6M8PaCWyT hrb+jRyPnrv3y+u1EXeBNYzqXOaeJkzg7YguXJUP+OlMrm+/LPAqmiDxKqckqlVS bEXNN/R+BOtnnUQ4H+Cm6COCRt7Gk2koAhC8ZykMPX962hW1CacIivxtXnIHn64h /8IQKD+4sM3C3fXWWbvfYyslgbilMfihynRy+3Y0qCDMf5PE27U= =/HTx -----END PGP SIGNATURE----- --oLBj+sq0vYjzfsbl--