pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: osdba <mailtch@163.com>
Cc: pgsql-docs@postgresql.org
Cc: jkatz@postgresql.org
Subject: Re: Document "59.2. Built-in Operator Classes" have a clerical error?
Date: Wed, 26 Aug 2020 18:39:27 -0400
Message-ID: <20200826223927.GB13370@momjian.us> (raw)
In-Reply-To: <20200826215801.GA30013@alvherre.pgsql>
References: <20200826065618.GG2017@paquier.xyz>
	<20200826215801.GA30013@alvherre.pgsql>

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  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee






view thread (28+ messages)  latest in thread

Message-ID: <20200826223927.GB13370@momjian.us>
Permalink:  ../20200826223927.GB13370@momjian.us/
Also on:    postgresql.org/message-id/20200826223927.GB13370@momjian.us

 · 

reply

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-docs@postgresql.org
  Cc: bruce@momjian.us, alvherre@2ndquadrant.com, michael@paquier.xyz, tgl@sss.pgh.pa.us, mailtch@163.com, jkatz@postgresql.org
  Subject: Re: Document "59.2. Built-in Operator Classes" have a clerical error?
  In-Reply-To: <20200826223927.GB13370@momjian.us>

* 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