Re: Text operators "~<=~ ~<~ ~>=~ ~>~" not documented

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Adrien Nayrat <adrien(dot)nayrat(at)dalibo(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: Text operators "~<=~ ~<~ ~>=~ ~>~" not documented
Date: 2018-02-08 15:42:34
Message-ID: 25753.1518104554@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Thu, Feb 8, 2018 at 6:26 AM, Adrien Nayrat <adrien(dot)nayrat(at)dalibo(dot)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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2018-02-09 17:48:31 Documentation of EXCEPT ALL may have a bug
Previous Message David G. Johnston 2018-02-08 15:32:50 Re: Text operators "~<=~ ~<~ ~>=~ ~>~" not documented