From: Andreas Karlsson <andreas@proxel.se>
To: Jeff Davis <pgsql@j-davis.com>
To: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers@postgresql.org
Subject: Re: tiny step toward threading: reduce dependence on setlocale()
Date: Fri, 26 Jul 2024 19:38:23 +0200
Message-ID: <468dd1fb-20f5-4213-bc70-d1388ccf28fa@proxel.se> (raw)
In-Reply-To: <56af65bde2190cc5ee20c807be7b7bdcda54f40c.camel@j-davis.com>
References: <2228884bb1f1a02614b39f71a90c94d2cc8a3a2f.camel@j-davis.com>
<239b7ef6ce058c6b1c77b3a0cfcc70c1cd8968b1.camel@j-davis.com>
<f1935bc481438c9d86c2e0ac537b1c110d41a00a.camel@j-davis.com>
<cfd9eb85-c52a-4ec9-a90e-a5e4de56e57d@eisentraut.org>
<56af65bde2190cc5ee20c807be7b7bdcda54f40c.camel@j-davis.com>
Nice refactoring!
Two small comments about CheckMyDatabase().
- Shouldn't we look at the default_locale.ctype_is_c when setting
database_ctype_is_c instead of doing a strcmp()? or maybe we should even
remove the global variable and always look at the default_locale?
- I think that the lookup of Anum_pg_database_datlocale could be done
later in the code since it is not needed when we use a libc locale. E.g.
as below.
if (dbform->datlocprovider == COLLPROVIDER_LIBC)
locale = collate;
else
{
datum = SysCacheGetAttr(DATABASEOID, tup,
Anum_pg_database_datlocale, &isnull);
if (!isnull)
locale = TextDatumGetCString(datum);
}
Also is there any reaosn you do not squash th 4th and the 6th patch?
Andreas
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: andreas@proxel.se, pgsql@j-davis.com, peter@eisentraut.org
Subject: Re: tiny step toward threading: reduce dependence on setlocale()
In-Reply-To: <468dd1fb-20f5-4213-bc70-d1388ccf28fa@proxel.se>
References: <2228884bb1f1a02614b39f71a90c94d2cc8a3a2f.camel@j-davis.com> <239b7ef6ce058c6b1c77b3a0cfcc70c1cd8968b1.camel@j-davis.com> <f1935bc481438c9d86c2e0ac537b1c110d41a00a.camel@j-davis.com> <cfd9eb85-c52a-4ec9-a90e-a5e4de56e57d@eisentraut.org> <56af65bde2190cc5ee20c807be7b7bdcda54f40c.camel@j-davis.com> <468dd1fb-20f5-4213-bc70-d1388ccf28fa@proxel.se>
* 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