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 1kB4NS-0007VU-RC for pgsql-docs@arkaria.postgresql.org; Wed, 26 Aug 2020 22:58:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kB4NR-00042q-OI for pgsql-docs@arkaria.postgresql.org; Wed, 26 Aug 2020 22:58:45 +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 1kB4NR-00042i-DA for pgsql-docs@lists.postgresql.org; Wed, 26 Aug 2020 22:58:45 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kB4NN-0006K5-2I for pgsql-docs@postgresql.org; Wed, 26 Aug 2020 22:58:45 +0000 Received: by mail-qk1-x742.google.com with SMTP id u3so4151184qkd.9 for ; Wed, 26 Aug 2020 15:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=kZa4vk2HkZL8DKfZCrcLGLTehzmiUX1cwAwqZzzpgG0=; b=ZCASF/rC7SHf8ClREvMqE/aGgBaP2KQXSPNYPd1rp5/D+SQurQWKggLxaEjZ0IKbRw dDbB7rMCX1Ak9IOQj17nPYhX2wc/4uhHt0te9B4uqvH7iY2D2AJyQQhtQjVV1IWgjnnW athZse4fRd25J9KJH9+EFi7kZSvkcw6G1WdIwFjLxX0E5SdoNQn0Jq0Rf3FMP5jPSd6O C/YKsQpLJBb6MFitx9B/BAL16hpTgbFPnZna2j5c0HXWD6HwCbLiek1pegzvJEF2ZcvT 13q8cp1q9ydkDE4yxGXr70WttOB7zwyxBU6+oc+I4kP4u8ZFXVL4E+ULUUVYvBK3MgWL qeug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=kZa4vk2HkZL8DKfZCrcLGLTehzmiUX1cwAwqZzzpgG0=; b=q/dtL1SYbmyJ1uQnsZKIjqUlRKqXJ23Nnc++YX03fkJMTMP5X9Yz20C+vk168Uw3MB /jb5ulCI6UKMyeBdPl4CmyCBxr5uPMZ+7u8FiKHBaKQeLeTqECedWywCe59tSfnX1Fel N0pGRHDyeuRF+thvS0yPCtE7rcWLE76TQHWqlXLGNauHGblqTbkYXxzbOmO6ze6u3Fp/ GI81nWcYymsj9MUNkb/nhZ7jDlOTOWiSiGtO0lXsAQDIngkGv4jtSJ5cSUv5PMNO8ADa q5F1pCrjdwS6LZ4Y46SvqbFbVlOXZ2plIjskv3JLRO4YySxk1gCBoLRzcFT4NxZHk/3G GvmQ== X-Gm-Message-State: AOAM530KYIJOhOfUWRt/KmoSTCJhlPP5/9G5Ds+eSzEXL/GADamaj8wG gWsI3xfYlPFWwzedSEYXF8gSFQ== X-Google-Smtp-Source: ABdhPJyNFYhDTmlAPMeele1W/8xAYmuKj0riBok6ncxEe7ADC8ze+I1L3gGFGbapgCiacReMKKC4RQ== X-Received: by 2002:a37:4144:: with SMTP id o65mr16086064qka.32.1598482719324; Wed, 26 Aug 2020 15:58:39 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id i20sm400721qka.17.2020.08.26.15.58.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 15:58:38 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 3D7F92A19E4; Wed, 26 Aug 2020 18:58:37 -0400 (-04) Date: Wed, 26 Aug 2020 18:58:37 -0400 From: Alvaro Herrera To: Bruce Momjian 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: <20200826225837.GA3099@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200826223927.GB13370@momjian.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Aug-26, Bruce Momjian wrote: > 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. The only reason I think it's worth pointing out, is that the opclass name is something you can use in CREATE INDEX, while the opfamily name cannot be used there. The original tables can be used for that purpose, but the patched tables cannot. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services