database level client_encoding setting check - Mailing list pgsql-bugs

From Kris Jurka
Subject database level client_encoding setting check
Date
Msg-id Pine.BSO.4.61.0601312044320.18898@leary.csoft.net
Whole thread Raw
List pgsql-bugs
When setting the default client_encoding for another database the validity
of the conversion is checked using the current database's server encoding,
not the targets.

jurka=# create database utf8 with encoding='utf8';
CREATE DATABASE
jurka=# create database win1251 with encoding='win1251';
CREATE DATABASE
jurka=# \c utf8
You are now connected to database "utf8".
utf8=# alter database win1251 set client_encoding to 'mule_internal';
ERROR:  conversion between mule_internal and UTF8 is not supported
utf8=# alter database win1251 set client_encoding to 'latin1';
ALTER DATABASE
utf8=# \c win1251
FATAL:  conversion between LATIN1 and WIN1251 is not supported
Previous connection kept

Kris Jurka

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] BUG #2221: Bad delimiters allowed in COPY ...
Next
From: David Fetter
Date:
Subject: Re: [PATCHES] BUG #2221: Bad delimiters allowed in COPY ...