Re: Text operators "~<=~ ~<~ ~>=~ ~>~" not documented - Mailing list pgsql-docs

From Tom Lane
Subject Re: Text operators "~<=~ ~<~ ~>=~ ~>~" not documented
Date
Msg-id 25753.1518104554@sss.pgh.pa.us
Whole thread Raw
In response to Re: Text operators "~<=~ ~<~ ~>=~ ~>~" not documented  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-docs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thu, Feb 8, 2018 at 6:26 AM, Adrien Nayrat <adrien.nayrat@dalibo.com>
> wrote:
>> While reading [1] I notice $subject operators lacks of explanation in
>> documentation.

> I'd be inclined to remove those four operators from the spgist page's table
> and replace them with "LIKE".  Then in the text below the table explain
> that LIKE is implemented using a combination of those four operators.

I believe it's intentional that those operators aren't documented: we
don't want people to get in the habit of using them directly.  (These
days, if you actually need what they do, the approved way to spell it
is like 'x < y COLLATE "C"'.)

So actually, my inclination would be to remove them from the spgist table
and put nothing back.  Implying that spgist text_ops fully supports LIKE
would certainly be wrong/confusing --- we do not claim in the main part
of the docs that btree text_ops supports LIKE, even though it has a
comparable level of support as long as you're using C collation.

Since these operators are user-visible in EXPLAIN output, there might be
merit in mentioning them in passing in the LIKE docs.  But we should not
put them in a table with the LIKE ops themselves, IMO.  That would just
invite confusion about what they do and whether you're supposed to use
them directly.

            regards, tom lane


pgsql-docs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Text operators "~<=~ ~<~ ~>=~ ~>~" not documented
Next
From: PG Doc comments form
Date:
Subject: Documentation of EXCEPT ALL may have a bug