NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Updating default PostgreSQL server encoding from SQL_ASCII to UTF8
Luis Falcon <falcon%gnuhealth.org@localhost> writes:
> Hi, Greg
> El Tue, 08 Sep 2026 12:29:02 -0400
>> My first question would be:
>>
>> If you build postgresql from sources on NetBSD, and you follow their
>> instructions, what do you end up with?
>
> I did not build the package. I installed postgresql18-server binary.
Sure, but generally pkgsrc attempts to do things the way upstream stays
it should be done. So if your desire is "postgresql should be
different", that's an upstream issue, and if it's "pkgsrc isn't
following upstream norms", that's a pkgsrc issue.
Looking at pkgsrc now, I see why there is a double -p.
@MKDIR@ -p ${pgsql_home
which is obviously right, except @MKDIR@ expands to "mkdir -p" it seems.
I have cc'd MAINTAINER who probably doesn't read netbsd-users; I'll
remove the extra -p as a bug in a week, if it hasn't happened and I
don't get an explanation why really it's right and I'm confused.
As for "what is postgresql's grand plan for encoding", my guess is the
answer is "the DBA should understand the issues and choose", and thus
pkgsrc's plan of doing a stealth init is contrary to their ideas.
Reading upstream:
https://www.postgresql.org/docs/current/app-initdb.html
By default, the template database encoding is derived from the
locale. If --no-locale is specified (or equivalently, if the locale is
C or POSIX), then the default is UTF8 for the ICU provider and
SQL_ASCII for the libc provider.
Our pgsql pakcages do not use icu (which makes sense; icu is an ABI
compat nightmare so IMHO best avoided when reasonable). Upstream --
for reasons that I don't understand -- thinks that a different default
is appropriate depending on the use of icu vs [something less than icu].
I am not comfortable changing the default for others.
My databases have encoding UTF8, but and I have a dim memory of doing
that on purpose.
Home |
Main Index |
Thread Index |
Old Index