Explicit or implicit?

Started by PG Bug reporting formover 4 years ago3 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

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

https://www.postgresql.org/docs/13/textsearch-intro.html

"The @@ operator also supports text input, allowing explicit conversion of a
text string to tsvector or tsquery to be skipped in simple cases."I believe
that the text is saying implicit, but uses the word "explicit" instead. Is
this a typo? Thanks.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: Explicit or implicit?

PG Doc comments form <noreply@postgresql.org> writes:

"The @@ operator also supports text input, allowing explicit conversion of a
text string to tsvector or tsquery to be skipped in simple cases."I believe
that the text is saying implicit, but uses the word "explicit" instead. Is
this a typo? Thanks.

I think it's intended. The point is that instead of, say,

tsvector_column @@ 'query here'::tsquery

you could just write

tsvector_column @@ 'query here'

regards, tom lane

#3Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Tom Lane (#2)
Re: Explicit or implicit?

On Sun, 2021-11-21 at 12:50 -0500, Tom Lane wrote:

PG Doc comments form <noreply@postgresql.org> writes:

"The @@ operator also supports text input, allowing explicit conversion of a
text string to tsvector or tsquery to be skipped in simple cases."I believe
that the text is saying implicit, but uses the word "explicit" instead. Is
this a typo? Thanks.

I think it's intended.  The point is that instead of, say,

        tsvector_column @@ 'query here'::tsquery

you could just write

        tsvector_column @@ 'query here'

Right. You can skip the explicit conversion of adding a type cast.

Yours,
Laurenz Albe