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 1kB3Qr-00054f-Vk for pgsql-docs@arkaria.postgresql.org; Wed, 26 Aug 2020 21:58:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kB3Qp-0001NN-Ah for pgsql-docs@arkaria.postgresql.org; Wed, 26 Aug 2020 21:58:11 +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 1kB3Qp-0001NG-1G for pgsql-docs@lists.postgresql.org; Wed, 26 Aug 2020 21:58:11 +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 1kB3Qk-0005Zd-0t for pgsql-docs@postgresql.org; Wed, 26 Aug 2020 21:58:08 +0000 Received: by mail-qk1-x742.google.com with SMTP id n129so3958658qkd.6 for ; Wed, 26 Aug 2020 14:58:05 -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=32IactTzxebb7C9gYJht9gdpy2MZL4LEWzDy87ORr+Y=; b=eKqcbyPboNjtFINDPeKuRAXrPupdMFQPFDB+K67wui5MzIny83EYnEqYEpyy638KO6 Z0gRAmHYJsX24o80KhpQCEV7Bh+NHR012NjNjhsaVdb00LpF7b6rh9iLjn0Bxd1uCJTD smgIaZFMGltmTcX8hgwCuoXlLr1fsj0Dk3UIWRzr8YLtGUXRBY4qO+Y+B1qrJAMD8zu4 HW9rShN92ChE/IkzFm9G2Tmads80jtMulSlzZAU85kLU8AxUEroIL0qwEb3w9lQ79ygZ ra7oeYhfemzhsmS7DoaBJobfYOQc151ySpQEShaPDNBJSgM9mjUili95Adv4CNuA9dp8 DHow== 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=32IactTzxebb7C9gYJht9gdpy2MZL4LEWzDy87ORr+Y=; b=l/amA2kTPaP6YtitV+osB7ZJpomrobuOoq08w0VrbKjPGqF9TNsVnsym88zdOjymrB slWHPvlrL2XuT7xHavfUeVLk+aDWZCatYVDxrF2HJ52OhE/YJDX+4jR81svON2lb4jzR KbG4+wsvymQzOghIJrddRp2JHh6aD8j++VqbpUjmU3z3JWEaLw7vU6x4I1wwvcvi518I 7A1lfivp16BYuJ3c19sPpVR5XsC+evwM0zJ+eV6RRWr//1i6tIkLvu8BjeaSL4qzSJYz sohtCgUmwMMIjyDLD4GYaFvOzEkAd9K18OvBG6OzDaXsjP+ccodlfqx46abRViSmMfy6 MPfA== X-Gm-Message-State: AOAM5327Mi+088My2hqttCFwRcVbXXbIX66yfwypf6v0f24nHATQ43q0 +wgUG2AfXy9BGRDXsXK6DNnyRA== X-Google-Smtp-Source: ABdhPJwU/i5I+EzXYbAi74I193bMJSa808laTHqeh6a/ZaFB3b3r7fze+FgWERI2ujwVqJ+NNdyguA== X-Received: by 2002:a37:b347:: with SMTP id c68mr16020958qkf.430.1598479084379; Wed, 26 Aug 2020 14:58:04 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id a15sm309688qkc.29.2020.08.26.14.58.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 14:58:03 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 0468F2A19E4; Wed, 26 Aug 2020 17:58:02 -0400 (-04) Date: Wed, 26 Aug 2020 17:58:01 -0400 From: Alvaro Herrera To: Michael Paquier Cc: Tom Lane , Bruce Momjian , osdba , pgsql-docs@postgresql.org, jkatz@postgresql.org Subject: Re: Document "59.2. Built-in Operator Classes" have a clerical error? Message-ID: <20200826215801.GA30013@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200826065618.GG2017@paquier.xyz> 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, Michael Paquier wrote: > On Tue, Aug 25, 2020 at 06:17:28PM -0400, Tom Lane wrote: > > I wonder if it would look better if we suppress the horizontal rules > > between the operator names within a cell. IIRC, it's possible to do > > that, though the exact incantation isn't coming to mind right now. > > I would imagine that rowsep=0 for a given can do that: > https://tdg.docbook.org/tdg/4.5/entry.html > However, it does not make a difference if I use the default style or > the website style. I may be missing something with the stylesheet > though? I have no idea there. Maybe Jon Katz (CCed) could help you to find an answer to that question. > >> I suppose a commit would change all the index AMs where we document this > >> kind of thing. > > > > Yeah, we should make all these sorts of tables consistent. > > Of course, just wanted to make sure that we agree on the layer before > spending more time on that as shaping all the tables correctly is a > lot of work. And GIN is the smallest one. Thanks for doing the legwork! > One thing to note about the BRIN table is that we have never > documented from the start any of the operators working across multiple > types. For example, we only have 5 operators listed for each one of > int2/int4/int8, timestamptz/timestamp or real/float, but these are > listed with incorrect names and they miss a bunch of other operators > able to handle combinations of (int2,int4), etc. So I have fixed the > table so as all the operators are listed, grouping together ints, > timestamps and reals, as \dAo says. 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): Operator family Operator class Operator ------------------------------------------------------------ integer_minmax_ops int4_minmax_ops =(integer,integer) <(integer,integer) >(integer,integer) >=(integer,integer) <=(integer,integer) --------------------------------------- int2_minmax_ops =(smallint,smallint) etc ---------------------------------------- ... other opclasses ... ---------------------------------------- =(smallint,integer) <(smallint,integer) >(smallint,integer) ... rest of operators ... ------------------------------------------------------------- -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services