database level client_encoding setting check

From: Kris Jurka <books(at)ejurka(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: database level client_encoding setting check
Date: 2006-02-01 01:49:18
Message-ID: Pine.BSO.4.61.0601312044320.18898@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-bugs by date

  From Date Subject
Next Message David Fetter 2006-02-01 02:48:10 Re: [PATCHES] BUG #2221: Bad delimiters allowed in COPY ...
Previous Message Bruce Momjian 2006-02-01 01:03:41 Re: [PATCHES] BUG #2221: Bad delimiters allowed in COPY ...