Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kB44u-0006nD-JX for pgsql-docs@arkaria.postgresql.org; Wed, 26 Aug 2020 22:39:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kB44t-0004QC-I6 for pgsql-docs@arkaria.postgresql.org; Wed, 26 Aug 2020 22:39:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kB44t-0004Q5-CR for pgsql-docs@lists.postgresql.org; Wed, 26 Aug 2020 22:39:35 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kB44q-0005zS-SP; Wed, 26 Aug 2020 22:39:34 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1kB44l-0003uO-HL; Wed, 26 Aug 2020 18:39:27 -0400 Date: Wed, 26 Aug 2020 18:39:27 -0400 From: Bruce Momjian To: Alvaro Herrera Cc: Michael Paquier , Tom Lane , osdba , pgsql-docs@postgresql.org, jkatz@postgresql.org Subject: Re: Document "59.2. Built-in Operator Classes" have a clerical error? Message-ID: <20200826223927.GB13370@momjian.us> References: <20200826065618.GG2017@paquier.xyz> <20200826215801.GA30013@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200826215801.GA30013@alvherre.pgsql> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Aug 26, 2020 at 05:58:01PM -0400, Alvaro Herrera wrote: > Well, there is a small problem here ... which is that I misled you with > \dAo ... because that one lists the operators for the opfamilies, not > for the opclasses. And you can't use the opfamily name in CREATE INDEX: > > 55432 14devel 30811=# create index on t using brin (a integer_minmax_ops); > ERROR: operator class "integer_minmax_ops" does not exist for access method "brin" > > You have to use the opclass name: > > 55432 14devel 30811=# create index on t using brin (a int4_minmax_ops); > CREATE INDEX > > Compare \dAf to \dAc. The latter shows what opclasses you can use for > each datatype, while the former shows what types can be used with an > index using the opfamily that the opclass belongs into. > > As I understand it, the cross-type operators are "loose" in the opfamily > and they don't belong to any opclass. So what we could do is list the > opclasses within each opfamily, and then list all the loose operators. > Something like (fixed width font): Stupid question, but do we think the average Postgres user can understand this issue. I am having trouble myself. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee