Re: Text correction - Mailing list pgsql-docs

From David G. Johnston
Subject Re: Text correction
Date
Msg-id CAKFQuwa5B+n9r=zS2-8d=oeU_AATDveYAjG3FVJjs8b=vxyZ4w@mail.gmail.com
Whole thread Raw
In response to Text correction  (PG Doc comments form <noreply@postgresql.org>)
List pgsql-docs
On Tue, Feb 11, 2025 at 2:16 PM PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/17/textsearch-intro.html
Description:

The page: https://www.postgresql.org/docs/17/textsearch-intro.html
The original sentence: "The form text @@ tsquery is equivalent to
to_tsvector(x) @@ y."
ends with " ... @@ y."
Perhaps it should end with the "... @@ tsquery." instead?

No.  The premise of this section is that the operator is defined as (typed value) OP (typed valued).

The left typed value is represented by x, the right typed value is represented by y.

These two explanations reference the typed values explicitly, either passing them into a function OR using them as-is.  They are written as value expressions so it makes sense to use both x and y in them.

I can see some merit in writing "to_tsvector(x) @@ tsquery" but it's not obvious to me that it is an improvement.  It feels like mixing two related but distinct concepts.  It if clearly made explaining it better I'd probably go for it but either way of writing seems to require a similar amount of mental effort to interpret.

Maybe you can explain what is confusing about the existing examples and how your proposal would overcome that?

David J.

pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: Threading issue / maybe just doc issue.
Next
From: "David G. Johnston"
Date:
Subject: Re: Improve examples: Provide the example which extend to the left of the range