From: Graeme <graeme@gemmill.name>
To: Adrian Klaver <adrian.klaver@aklaver.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: pg_update and encoding
Date: Tue, 12 Sep 2023 15:56:46 +0100
Message-ID: <54131f54-2118-414e-9405-8ae4b1d0c56f@gemmill.name> (raw)
In-Reply-To: <9b639095-b92c-de7a-3c99-de4777857599@aklaver.com>
References: <c8259d40-b44b-4a1c-9cfe-c843c7631280@gemmill.name>
<9b639095-b92c-de7a-3c99-de4777857599@aklaver.com>
On 12/09/2023 15:52, Adrian Klaver wrote:
> On 9/12/23 04:49, Graeme wrote:
>> Preparing to use pg_update, I used initdb to create the new
>> pgsql/data, but pg_update has exited with
>
> I'm guessing that is actually pg_upgrade:
>
> https://www.postgresql.org/docs/current/pgupgrade.html
>
>>
>> encodings for database "template1" do not match: old "UTF8", new
>> "SQL_ASCII"
>>
>> Should I delete pgsql/data and re-create with initdb -E "UTF8"?
>
> Yes for two reasons:
>
> 1) The upgrade will not happen.
>
> 2) From here:
>
> https://www.postgresql.org/docs/current/multibyte.html
>
> "The SQL_ASCII setting behaves considerably differently from the other
> settings. When the server character set is SQL_ASCII, the server
> interprets byte values 0–127 according to the ASCII standard, while
> byte values 128–255 are taken as uninterpreted characters. No encoding
> conversion will be done when the setting is SQL_ASCII. Thus, this
> setting is not so much a declaration that a specific encoding is in
> use, as a declaration of ignorance about the encoding. In most cases,
> if you are working with any non-ASCII data, it is unwise to use the
> SQL_ASCII setting because PostgreSQL will be unable to help you by
> converting or validating non-ASCII characters."
>
>>
>> Thanks,
>>
>> Graeme
>>
>
Thanks, done. Data now accessible
Graeme
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: graeme@gemmill.name, adrian.klaver@aklaver.com
Subject: Re: pg_update and encoding
In-Reply-To: <54131f54-2118-414e-9405-8ae4b1d0c56f@gemmill.name>
References: <c8259d40-b44b-4a1c-9cfe-c843c7631280@gemmill.name> <9b639095-b92c-de7a-3c99-de4777857599@aklaver.com> <54131f54-2118-414e-9405-8ae4b1d0c56f@gemmill.name>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox