Re: Custom Glibc collation version strings under LOCPATH - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Custom Glibc collation version strings under LOCPATH
Date
Msg-id c6896081-335f-4e4f-a47d-6ed9c7ddcdbb@eisentraut.org
Whole thread Raw
In response to Custom Glibc collation version strings under LOCPATH  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Custom Glibc collation version strings under LOCPATH
List pgsql-hackers
On 04.06.25 06:03, Thomas Munro wrote:
> One way to move to a newer glibc-based Linux distribution but keep the
> locales working the same* without keeping the associated zombie C code
> alive is to find the source system's collation definition source
> files, compile them with the localedef on the target system and point
> to the top-level directory with the environment variable LOCPATH.
> 
> That runs directly into the naivity of commit d5ac14f9's
> gnu_get_libc_version() kludge.  So here's a patch that allows a brave
> user of that recompilation technique to drop a custom version string
> into a file called one of:
> 
>        * $LOCPATH/<collcollate>/LC_COLLATE.version
>        * $LOCPATH/<collcollate>/version
>        * $LOCPATH/LC_COLLATE.version
>        * $LOCPATH/version

Nice idea.

The patch looks mostly straightforward.

I wonder why you want to capture LOCPATH early in main.c.  It seems 
sufficient to look it up when needed?




pgsql-hackers by date:

Previous
From: Florents Tselai
Date:
Subject: Re: encode/decode support for base64url
Next
From: Shinya Kato
Date:
Subject: Re: Partitioned tables and [un]loggedness