Re: tiny step toward threading: reduce dependence on setlocale()

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-08-28 16:43:49
Message-ID: 60929555-4709-40a7-b136-bcb44cff5a3c@proxel.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8/15/24 12:55 AM, Jeff Davis wrote:
> This overlaps a bit with what Peter already proposed here:
>
> https://www.postgresql.org/message-id/4f562d84-87f4-44dc-8946-01d6c437936f%40eisentraut.org
>
> right?

Maybe I am missing something but not as far as I can see. It is related
but I do not see any overlap.

>> 0003-Remove-dubious-check-against-default-locale.patch
>>
>> This patch removes a check against DEFAULT_COLLATION_OID which I
>> thought
>> looked really dubious. Shouldn't this just be a simple check for if
>> the
>> locale is deterministic? Since we know we have a valid locale that
>> should be enough, right?
>
> Looks good to me. The code was correct in the sense that the default
> collation is always deterministic, but (a) Peter is working on non-
> deterministic default collations; and (b) it was a redundant check.

Suspected so.

I have attached a set of rebased patches with an added assert. Maybe I
should start a new thread though.

Andreas

Attachment Content-Type Size
v2-0005-Remove-pg_collate_deterministic-and-check-field-d.patch text/x-patch 7.5 KB
v2-0004-Do-not-check-both-for-collate_is_c-and-determinis.patch text/x-patch 1.7 KB
v2-0003-Remove-dubious-check-against-default-locale.patch text/x-patch 744 bytes
v2-0002-Remove-lc_ctype_is_c.patch text/x-patch 10.0 KB
v2-0001-Remove-lc_collate_is_c.patch text/x-patch 9.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sushrut Shivaswamy 2024-08-28 16:57:58 Re: Reading all tuples in Index Access Method
Previous Message Jacob Champion 2024-08-28 16:31:07 Re: [PoC] Federated Authn/z with OAUTHBEARER