Re: make tsearch use the database default locale

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: make tsearch use the database default locale
Date: 2025-10-21 07:23:02
Message-ID: 76565b34-1b39-4124-a6c8-41640553e5fc@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 19.10.25 02:29, Jeff Davis wrote:
> On Fri, 2025-10-17 at 18:15 +0200, Peter Eisentraut wrote:
>>
>> This is indeed a bit mysterious.  AFAICT, the behavior you describe
>> is
>> conditional on if (prs->usewide), so it apparently depends also on
>> the
>> encoding?  I'm not sure if the new code covers this.
>
> I believe the new code does cover this case:
>
> Previously, the code was effectively:
> if (prs->usewide && prs->pgwstr != NULL && c > 0x7f)
> retirm nonascii
>
> and the new code is:
> if (prs->charmaxlen > 1 && locale->ctype_is_c && wc > 0x7f)
> return nonascii;
>
> unless I missed something, those are equivalent.

Yes, this looks ok.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-10-21 07:25:27 Re: CREATE POLICY IF NOT EXISTS
Previous Message Heikki Linnakangas 2025-10-21 07:18:38 Re: get rid of RM_HEAP2_ID