pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: tsearch: use database default collation for parsing.
Date: Tue, 21 Oct 2025 16:33:57 +0000
Message-ID: <E1vBFJ7-002o5Q-1o@gemulon.postgresql.org> (raw)

tsearch: use database default collation for parsing.

Previously, tsearch used the database's CTYPE setting, which only
matches the database default collation if the locale provider is libc.

Note that tsearch types (tsvector and tsquery) are not collatable
types. The locale affects parsing the original text, which is a lossy
process, so a COLLATE clause on the already-parsed value would not
make sense.

Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/0151ad01239e2cc7b3139644358cf8f7b9622ff7.camel@j-davis.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e113f9c102b7e2462facf0ecffc97f8093efed54

Modified Files
--------------
src/backend/tsearch/ts_locale.c   | 40 ++++++++--------------
src/backend/tsearch/wparser_def.c | 71 +++++++--------------------------------
2 files changed, 27 insertions(+), 84 deletions(-)



Message-ID: <E1vBFJ7-002o5Q-1o@gemulon.postgresql.org>
Permalink:  ../E1vBFJ7-002o5Q-1o@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vBFJ7-002o5Q-1o@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: tsearch: use database default collation for parsing.
  In-Reply-To: <E1vBFJ7-002o5Q-1o@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox