From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: jiri.verunek@seznam.cz
Subject: Bug in the documentation - to_tsquery( 'postgres:*' );
Date: Wed, 05 Apr 2023 08:27:28 +0000
Message-ID: <168068324809.625.9758151466474571203@wrigleys.postgresql.org> (raw)
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/15/index.html
Description:
There is a bug in the documentation on the link
https://www.postgresql.org/docs/current/datatype-textsearch.html
postgres does not get stemmed to postgr by :to_tsquery( 'postgres:*' );
and
SELECT to_tsvector( 'postgraduate' ) @@ to_tsquery( 'postgres:*' );
returns f.
I am using PostgreSQL 12.14 but the documentation for PostgreSQL 12 is not
correct either.
Here is the output from my system:
SELECT to_tsvector( 'postgraduate' ), to_tsquery( 'postgres:*' );
to_tsvector | to_tsquery
------------------+--------------
'postgraduate':1 | 'postgres':*
(1 row)
So the below mentioned citation seems to be wrong.
Citation:
Note that to_tsquery will process prefixes in the same way as other words,
which means this comparison returns true:
SELECT to_tsvector( 'postgraduate' ) @@ to_tsquery( 'postgres:*' );
?column?
----------
t
because postgres gets stemmed to postgr:
SELECT to_tsvector( 'postgraduate' ), to_tsquery( 'postgres:*' );
to_tsvector | to_tsquery
---------------+------------
'postgradu':1 | 'postgr':*
which will match the stemmed form of postgraduate.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, jiri.verunek@seznam.cz
Subject: Re: Bug in the documentation - to_tsquery( 'postgres:*' );
In-Reply-To: <168068324809.625.9758151466474571203@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox