pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedBug in the documentation - to_tsquery( 'postgres:*' );
2+ messages / 2 participants
[nested] [flat]
* Bug in the documentation - to_tsquery( 'postgres:*' );
@ 2023-04-05 08:27 PG Doc comments form <noreply@postgresql.org>
2023-04-05 11:18 ` Re: Bug in the documentation - to_tsquery( 'postgres:*' ); Jiri Verunek <jiri.verunek@seznam.cz>
0 siblings, 1 reply; 2+ messages in thread
From: PG Doc comments form @ 2023-04-05 08:27 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org; +Cc: jiri.verunek@seznam.cz
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.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Bug in the documentation - to_tsquery( 'postgres:*' );
2023-04-05 08:27 Bug in the documentation - to_tsquery( 'postgres:*' ); PG Doc comments form <noreply@postgresql.org>
@ 2023-04-05 11:18 ` Jiri Verunek <jiri.verunek@seznam.cz>
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Verunek @ 2023-04-05 11:18 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org
Maybe the documentation could say that it is assumed that the database
is configured with
default_text_search_config = 'english'
in the configuration file.
In case of my distribution, the parameter was set to 'pg_catalog.simple'.
/etc/postgresql/<version>/main/postgresql.conf
default_text_search_config = 'pg_catalog.simple'
Jiri
On Wed, Apr 05, 2023 at 08:27:28AM +0000, PG Doc comments form wrote:
> 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.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-04-05 11:18 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-04-05 08:27 Bug in the documentation - to_tsquery( 'postgres:*' ); PG Doc comments form <noreply@postgresql.org>
2023-04-05 11:18 ` Jiri Verunek <jiri.verunek@seznam.cz>
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