Re: client_encoding issue with SQL_ASCII on 8.3 to 10 upgrade - Mailing list pgsql-general

From Adrian Klaver
Subject Re: client_encoding issue with SQL_ASCII on 8.3 to 10 upgrade
Date
Msg-id 6cd19ec1-8f1f-c2a8-6c9c-76c230cdcf51@aklaver.com
Whole thread Raw
In response to Re: client_encoding issue with SQL_ASCII on 8.3 to 10 upgrade  (Keith Fiske <keith.fiske@crunchydata.com>)
List pgsql-general
On 04/16/2018 10:18 AM, Keith Fiske wrote:
> 
> 

> 
> So playing around with the "client_encoding" configuration option in 
> postgresql.conf. According to the docs, setting this should set the 
> default encoding for any client that connects, right?
> 
> https://www.postgresql.org/docs/10/static/runtime-config-client.html#GUC-CLIENT-ENCODING 
> <https://www.postgresql.org/docs/10/static/runtime-config-client.html#GUC-CLIENT-ENCODING>
> 
> That description also seems misleading in saying that the default client 
> encoding is what the database encoding is as well. At least as far as 
> psql is concerned, right? I've tried setting that value in 
> postgresql.conf but psql keeps setting it to UTF8 when I connect to the 
> SQL_ASCII database unless I then specifically run "set client_encoding = 
> 'SQL_ASCII';"

The order that parameters are evaluated for libpq programs is:

https://www.postgresql.org/docs/10/static/libpq-connect.html

"PQconnectdbParams

...


If any parameter is NULL or an empty string, the corresponding 
environment variable (see Section 33.14) is checked. If the environment 
variable is not set either, then the indicated built-in defaults are used.

...

"

> 
> -- 
> Keith Fiske
> Senior Database Engineer
> Crunchy Data - http://crunchydata.com


-- 
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: client_encoding issue with SQL_ASCII on 8.3 to 10 upgrade
Next
From: Adrian Klaver
Date:
Subject: Re: client_encoding issue with SQL_ASCII on 8.3 to 10 upgrade