Re: tsvector not giving expected results on one host

2022-12-21 Thread Dan Langille
Oleg Bartunov wrote on 12/21/22 12:31 PM: I On Wed, Dec 21, 2022 at 1:12 PM Oleg Bartunov wrote: Dan, it's always good to specify configuration name in a query to avoid recheck, since websearch_to_tsquery(regconfig, text) is immutable, while websearch_to_tsquery(text) is stable. I am glad

Re: tsvector not giving expected results on one host

2022-12-21 Thread Oleg Bartunov
I On Wed, Dec 21, 2022 at 1:12 PM Oleg Bartunov wrote: > > Dan, > > it's always good to specify configuration name in a query to avoid > recheck, since > websearch_to_tsquery(regconfig, text) is immutable, while > websearch_to_tsquery(text) is stable. immutable function calculates once in plann

Re: tsvector not giving expected results on one host

2022-12-21 Thread Oleg Bartunov
Dan, it's always good to specify configuration name in a query to avoid recheck, since websearch_to_tsquery(regconfig, text) is immutable, while websearch_to_tsquery(text) is stable. See the difference: [local]:5433 oleg@oleg=# explain (analyze,costs off) select title from apod where websearc

Re: tsvector not giving expected results on one host

2022-12-17 Thread Dan Langille
On Sat, Dec 17, 2022, at 3:22 PM, Dan Langille wrote: > On Sat, Dec 17, 2022, at 3:14 PM, Dan Langille wrote: >> On Sat, Dec 17, 2022, at 2:55 PM, Tom Lane wrote: >>> "Dan Langille" writes: pkgmessage_textsearchable2 | tsvector | | | generated always

Re: tsvector not giving expected results on one host

2022-12-17 Thread Dan Langille
On Sat, Dec 17, 2022, at 3:14 PM, Dan Langille wrote: > On Sat, Dec 17, 2022, at 2:55 PM, Tom Lane wrote: >> "Dan Langille" writes: >>> pkgmessage_textsearchable2 | tsvector | | >>> | generated always as (to_tsvector('english'::regconfig, >>> translate(pkgmess

Re: tsvector not giving expected results on one host

2022-12-17 Thread Dan Langille
On Sat, Dec 17, 2022, at 2:55 PM, Tom Lane wrote: > "Dan Langille" writes: >> pkgmessage_textsearchable2 | tsvector | | >> | generated always as (to_tsvector('english'::regconfig, >> translate(pkgmessage, '/'::text, ' '::text))) stored > > That is not likely t

Re: tsvector not giving expected results on one host

2022-12-17 Thread Tom Lane
"Dan Langille" writes: > pkgmessage_textsearchable2 | tsvector | | > | generated always as (to_tsvector('english'::regconfig, > translate(pkgmessage, '/'::text, ' '::text))) stored That is not likely to play well with this: > freshports.org=> show default_t

Re: tsvector not giving expected results on one host

2022-12-17 Thread Dan Langille
On Sat, Dec 17, 2022, at 1:53 PM, Dan Langille wrote: > Under PostgreSQL 12, I have a table using tsvector to search the column > pkgmessage. > > It looks like this (not all columns are shown). > > > Table "public

tsvector not giving expected results on one host

2022-12-17 Thread Dan Langille
Under PostgreSQL 12, I have a table using tsvector to search the column pkgmessage. It looks like this (not all columns are shown). Table "public.ports" Column | Type | C