Re: to_tsvector() chopping off trailing 's' characters

Поиск
Список
Период
Сортировка
Искать
От
Wells Oliver
Тема
Re: to_tsvector() chopping off trailing 's' characters
Дата
Msg-id
CAOC+FBVryOu_3jxGPCd_56ikGuDwbWiBKNev0H-o2hMx8fmd7w@mail.gmail.com
Ответ на
Список
Дерево обсуждения
to_tsvector() chopping off trailing 's' characters Wells Oliver <wells.oliver@gmail.com>
Re: to_tsvector() chopping off trailing 's' characters Wells Oliver <wells.oliver@gmail.com>
Re: to_tsvector() chopping off trailing 's' characters Tom Lane <tgl@sss.pgh.pa.us>
Re: to_tsvector() chopping off trailing 's' characters Wells Oliver <wells.oliver@gmail.com>
Yeah, odd. I must have borked this somehow, probably remnants of an older installation. I have two PG 12 servers, one where 'simple' works, which has:

   Schema   |    Name     | Result data type | Argument data types | Type
------------+-------------+------------------+---------------------+------
 pg_catalog | to_tsvector | tsvector         | json                | func
 pg_catalog | to_tsvector | tsvector         | jsonb               | func
 pg_catalog | to_tsvector | tsvector         | regconfig, json     | func
 pg_catalog | to_tsvector | tsvector         | regconfig, jsonb    | func
 pg_catalog | to_tsvector | tsvector         | regconfig, text     | func
 pg_catalog | to_tsvector | tsvector         | text                | func

And the one where it's borked:

   Schema   |    Name     | Result data type | Argument data types | Type
------------+-------------+------------------+---------------------+------
 pg_catalog | to_tsvector | tsvector         | json                | func
 pg_catalog | to_tsvector | tsvector         | jsonb               | func
 pg_catalog | to_tsvector | tsvector         | regconfig, json     | func
 pg_catalog | to_tsvector | tsvector         | regconfig, jsonb    | func
 pg_catalog | to_tsvector | tsvector         | regconfig, text     | func
 pg_catalog | to_tsvector | tsvector         | text                | func
 public     | to_tsvector | tsvector         | oid, text           | func

Seems that public function is the weirdo remnant breaking things. I ... think... I can just drop public.to_tsvector, right?




On Fri, Nov 1, 2019 at 11:54 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Wells Oliver <wells.oliver@gmail.com> writes:
> Sorry for the follow up, meant to add I tried this:
> select 'Thames', to_tsvector('simple', 'fat cats ate rats');
> And it throws: ERROR:  invalid input syntax for type oid: "simple"

That works for me.  I suspect you've got some nonstandard versions
of to_tsvector() hanging about.  There should only be

regression=# \df to_tsvector
                            List of functions
   Schema   |    Name     | Result data type | Argument data types | Type
------------+-------------+------------------+---------------------+------
 pg_catalog | to_tsvector | tsvector         | json                | func
 pg_catalog | to_tsvector | tsvector         | jsonb               | func
 pg_catalog | to_tsvector | tsvector         | regconfig, json     | func
 pg_catalog | to_tsvector | tsvector         | regconfig, jsonb    | func
 pg_catalog | to_tsvector | tsvector         | regconfig, text     | func
 pg_catalog | to_tsvector | tsvector         | text                | func
(6 rows)

                        regards, tom lane


--
В списке pgsql-admin по дате отправления
От: Tom Lane
Дата:
От: girish R G peetle
Дата:
FAQ