public inbox for [email protected]help / color / mirror / Atom feed
Re: Running psql in a docker container 4+ messages / 2 participants [nested] [flat]
* Re: Running psql in a docker container @ 2024-07-11 18:20 Tom Lane <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Tom Lane @ 2024-07-11 18:20 UTC (permalink / raw) To: H <[email protected]>; +Cc: [email protected]; Adrian Klaver <[email protected]> H <[email protected]> writes: > Good question! ”No success” meant that I have not been able to figure out how to have new databases default to en_US.UTF-8, instead they default to C.UTF-8. The default for an installation is determined at initdb time, either with an explicit locale switch or from the environment locale settings. regards, tom lane ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Running psql in a docker container @ 2024-07-11 18:28 H <[email protected]> parent: Tom Lane <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: H @ 2024-07-11 18:28 UTC (permalink / raw) To: [email protected]; Tom Lane <[email protected]>; +Cc: Adrian Klaver <[email protected]> On July 11, 2024 2:20:43 PM EDT, Tom Lane <[email protected]> wrote: >H <[email protected]> writes: >> Good question! ”No success” meant that I have not been able to figure >out how to have new databases default to en_US.UTF-8, instead they >default to C.UTF-8. > >The default for an installation is determined at initdb time, either >with an explicit locale switch or from the environment locale >settings. > > regards, tom lane Understood but how should formulate the initdb statement to accomplish what I want on pgsql 16 since the syntax I used for pgsql 13 does not work in my container? ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Running psql in a docker container @ 2024-07-11 19:48 Tom Lane <[email protected]> parent: H <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Tom Lane @ 2024-07-11 19:48 UTC (permalink / raw) To: H <[email protected]>; +Cc: [email protected]; Adrian Klaver <[email protected]> H <[email protected]> writes: > Understood but how should formulate the initdb statement to accomplish what I want on pgsql 16 since the syntax I used for pgsql 13 does not work in my container? You still haven't shown us the actual error message, so we're all just guessing. I will offer a guess though. This *should* work, since Rocky 9 is a direct descendant of RHEL/CentOS 7. The only reason I can think why it wouldn't is that you haven't installed the OS package that defines en_US.UTF-8. Try doing "locale -a" and see if en_US.UTF-8 is among the listed locales. On my RHEL8 box, it looks like glibc-locale-source is what provides most non-C locales. regards, tom lane ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Running psql in a docker container @ 2024-07-11 20:25 H <[email protected]> parent: Tom Lane <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: H @ 2024-07-11 20:25 UTC (permalink / raw) To: [email protected]; Tom Lane <[email protected]>; +Cc: Adrian Klaver <[email protected]> On July 11, 2024 3:48:42 PM EDT, Tom Lane <[email protected]> wrote: >H <[email protected]> writes: >> Understood but how should formulate the initdb statement to >accomplish what I want on pgsql 16 since the syntax I used for pgsql 13 >does not work in my container? > >You still haven't shown us the actual error message, so we're all >just guessing. > >I will offer a guess though. This *should* work, since Rocky 9 >is a direct descendant of RHEL/CentOS 7. The only reason I can >think why it wouldn't is that you haven't installed the OS package >that defines en_US.UTF-8. Try doing "locale -a" and see if >en_US.UTF-8 is among the listed locales. > >On my RHEL8 box, it looks like glibc-locale-source is what >provides most non-C locales. > > regards, tom lane I run locale på in the container and found that the appropriate locale is called en_US.utf8, ie. not en_US.UTF-8... Problem now solved! Thank you all! ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2024-07-11 20:25 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-07-11 18:20 Re: Running psql in a docker container Tom Lane <[email protected]> 2024-07-11 18:28 ` H <[email protected]> 2024-07-11 19:48 ` Tom Lane <[email protected]> 2024-07-11 20:25 ` H <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox