Question Details

No question body available.

Tags

sql postgresql full-text-search postgresql-17

Answers (1)

March 2, 2026 Score: 0 Rep: 30,532 Quality: Medium Completeness: 80%

Chapter 19.1.3 Server Configuration. Parameter Interaction via SQL:

Values set with ALTER DATABASE and ALTER ROLE are applied only when starting a fresh database session.

You changed the db-wide default value for the defaulttextsearchconfig setting, but for it to apply to live sessions including yours, you'd have to reconnect. You can change the current value from inside the session without reconnecting, with a regular set:
demo at dbfiddle

set defaulttextsearchconfig to 'portuguessemacento';

select totsvector('Cação') , plaintotsquery('cacao') , totsvector('Cação') @@ totsquery('cacao');
totsvector plaintotsquery ?column?
'caca':1 'caca' t

SELECT * FROM tsdebug('portuguessemacento', 'Cação');
alias description token dictionaries dictionary lexemes
word Word, all letters Cação {unaccent,portuguesestem} unaccent {Cacao}