| From: | Andreas Karlsson <andreas(at)proxel(dot)se> |
|---|---|
| To: | Jeff Davis <pgsql(at)j-davis(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: tiny step toward threading: reduce dependence on setlocale() |
| Date: | 2024-07-26 17:38:23 |
| Message-ID: | 468dd1fb-20f5-4213-bc70-d1388ccf28fa@proxel.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2024-07-26 17:40:12 | Re: Add ALL_CANDIDATES option to EXPLAIN |
| Previous Message | Robert Haas | 2024-07-26 17:16:43 | Re: Add ALL_CANDIDATES option to EXPLAIN |