Problem with text search in Postgresql 10

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with text search in Postgresql 10

Howard News
Hi everyone,

a colleague has restored a backup from an older version of Postgres
(unknown) to version 10. Everything appears to be working fine with the
exception of the text search.

If I try:

select to_tsquery('english', 'hello');

I get the error

ERROR:  invalid input syntax for type oid: "english"
LINE 1: select to_tsquery('english','Hello');

I can see from \dF that I have 'pg_catalog.english' installed. It works
if I do not specify the dictionary using:

select to_tsquery('hello');

Any ideas how to fix this? I have read in older support forums that the
problem may be related to older contrib methods for ts_query. If this is
so - how do I remove the contrib decalrations?

Thanks

Howard


Reply | Threaded
Open this post in threaded view
|

Re: Problem with text search in Postgresql 10

Tom Lane-2
Howard News <[hidden email]> writes:
> If I try:
> select to_tsquery('english', 'hello');
> I get the error
> ERROR:  invalid input syntax for type oid: "english"

Huh, should work.  What does "\df *.to_tsquery" show?

> Any ideas how to fix this? I have read in older support forums that the
> problem may be related to older contrib methods for ts_query. If this is
> so - how do I remove the contrib decalrations?

Could be something like that, but let's not theorize in advance of
the data.

If you could find out what PG version the older database was, that'd help.
Also, was text search working for your colleague in the old installation?

                        regards, tom lane