agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
Text correction
2+ messages / 2 participants
[nested] [flat]

* Text correction
@ 2025-02-11 18:52 PG Doc comments form <noreply@postgresql.org>
  2025-02-17 21:54 ` Re: Text correction David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2025-02-11 18:52 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: anton.josua@gmail.com

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?


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Text correction
  2025-02-11 18:52 Text correction PG Doc comments form <noreply@postgresql.org>
@ 2025-02-17 21:54 ` David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2025-02-17 21:54 UTC (permalink / raw)
  To: anton.josua@gmail.com; pgsql-docs@lists.postgresql.org

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.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-02-17 21:54 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-02-11 18:52 Text correction PG Doc comments form <noreply@postgresql.org>
2025-02-17 21:54 ` David G. Johnston <david.g.johnston@gmail.com>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox