Re: check_strxfrm_bug()

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: check_strxfrm_bug()
Date: 2023-06-12 08:48:14
Message-ID: 726eece8-6e9d-9013-0e4a-a1f9e40c09b3@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/06/2023 01:15, Thomas Munro wrote:
> There are still at least a couple
> of functions that lack XXX_l variants in the standard: mbstowcs() and
> wcstombs() (though we use the non-standard _l variants if we find them
> in <xlocale.h>), but that's OK because we use uselocale() and not
> setlocale(), because uselocale() is required to be thread-local.

Right, mbstowcs() and wcstombs() are already thread-safe, that's why
there are no _l variants of them.

> The use of setlocale() to set up the per-backend/per-database
> default locale would have to be replaced with uselocale().
This recent bug report is also related to that:
https://www.postgresql.org/message-id/17946-3e84cb577e9551c3%40postgresql.org.
In a nutshell, libperl calls uselocale(), which overrides the setting we
try set with setlocale().

--
Heikki Linnakangas
Neon (https://neon.tech)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii.Yuki@df.MitsubishiElectric.co.jp 2023-06-12 08:51:30 RE: Partial aggregates pushdown
Previous Message Richard Guo 2023-06-12 08:20:14 Re: Remove WindowClause PARTITION BY items belonging to redundant pathkeys