Home > Net >  to_tsvector change behaviour
to_tsvector change behaviour

Time:09-17

I have migrated from RDS Aurora PostgreSQL 13.6 to Hetzner Managed DB PostgreSQL 13.8 and this query

SELECT to_tsvector('I am a heroe') @@ to_tsquery('I & am & a & hero') returns FALSE with RDS but TRUE with Hetzner

What could be the reason that bring this change ?

RDS uses pg_catalog.simple and Hetzner pg_catalog.english But still on Hetzner SELECT to_tsvector('I am a hero') @@ to_tsquery('simple', 'I & am & a & hero') returns false

Thanks

CodePudding user response:

The answer must be that the parameter default_text_search_config is set to different languages in both databases. It is best to always explicitly specify the language, as in

to_tsvector('english', 'I am a heroe')
  • Related