pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Keith Fiske <keith.fiske@crunchydata.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: client_encoding issue with SQL_ASCII on 8.3 to 10 upgrade
Date: Mon, 16 Apr 2018 12:21:48 -0400
Message-ID: <11209.1523895708@sss.pgh.pa.us> (raw)
In-Reply-To: <CAODZiv75hfwLbfH0BWKFdq6c5M5NjyhB+oexLWPDvpJuwBLmeg@mail.gmail.com>
References: <CAODZiv7K+AaJSPk=uqmNa7UQ2va7z_1d_KgVeZzEeqDNvgBn9g@mail.gmail.com>
	<10581.1523894949@sss.pgh.pa.us>
	<CAODZiv75hfwLbfH0BWKFdq6c5M5NjyhB+oexLWPDvpJuwBLmeg@mail.gmail.com>

Keith Fiske <keith.fiske@crunchydata.com> writes:
> On Mon, Apr 16, 2018 at 12:09 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> This is not a great idea, no.  You could be getting strange misbehaviors
>> in e.g. string comparison, because strcoll() will expect UTF8 data and
>> will likely not cope well with data that isn't valid in that encoding.

> And pg_controldata was able to show that the CTYPE and COLLATE were UTF8 on
> the old system. If that's the case, do you still think it's a good idea to
> set the COLLATE and CTYPE to "C"?

Well, if the customer's been happy with the behavior of the system so far,
maybe it's all right.  But this is sure the first thing I'd look at if
there are any gripes about its behavior with non-UTF8 strings.  I'd be
especially worried about this if you try to migrate the database to any
new platform, as it's a bet about the behavior of libc not PG itself.

			regards, tom lane




view thread (14+ messages)  latest in thread

Message-ID: <11209.1523895708@sss.pgh.pa.us>
Permalink:  ../11209.1523895708@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11209.1523895708@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, keith.fiske@crunchydata.com
  Subject: Re: client_encoding issue with SQL_ASCII on 8.3 to 10 upgrade
  In-Reply-To: <11209.1523895708@sss.pgh.pa.us>
  References: <CAODZiv7K+AaJSPk=uqmNa7UQ2va7z_1d_KgVeZzEeqDNvgBn9g@mail.gmail.com> <10581.1523894949@sss.pgh.pa.us> <CAODZiv75hfwLbfH0BWKFdq6c5M5NjyhB+oexLWPDvpJuwBLmeg@mail.gmail.com> <11209.1523895708@sss.pgh.pa.us>

* 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