Re: Text correction

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: anton(dot)josua(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Text correction
Date: 2025-02-17 21:54:24
Message-ID: CAKFQuwa5B+n9r=zS2-8d=oeU_AATDveYAjG3FVJjs8b=vxyZ4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Tue, Feb 11, 2025 at 2:16 PM PG Doc comments form <noreply(at)postgresql(dot)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.

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2025-02-17 22:48:06 Re: Improve examples: Provide the example which extend to the left of the range
Previous Message PG Doc comments form 2025-02-17 21:38:32 Threading issue / maybe just doc issue.