Skip site navigation (1) Skip section navigation (2)

Re: BUG #4890: Allow insert character has no equivalent in "LATIN2"

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: saint <saint(at)akpa(dot)pl>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4890: Allow insert character has no equivalent in "LATIN2"
Date: 2009-06-29 11:04:49
Message-ID: 1246273489.11346.11.camel@ayaki (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
On Sat, 2009-06-27 at 19:20 +0000, saint wrote:

> set client_encoding to 'WIN1250';
> insert into public.test(col) values('‰');

You're lying to the server about the client encoding in one or both
cases. I can't know which without knowing what program you're talking to
the server with and how it's set up.

'SET client_encoding' tells the server what encoding to expect incoming
data in. It doesn't change what encoding the client sends that data in.
If your client has a different default encoding to that of the server,
you can inform the server that the client will be sending differently
encoded data.

In other words, you can't use 'SET client_encoding' to change what
encoding the client uses, only how the server interprets the bytes it
gets from the client.

Craig Ringer

In response to


pgsql-bugs by date

Next:From: Craig RingerDate: 2009-06-29 11:08:00
Subject: Re: BUG #4875: /etc/init.d/postgresql status shows postmaster is stopped when executed as user
Previous:From: Vladimir LavrentievDate: 2009-06-29 06:58:59
Subject: BUG #4893: Grants on inherited tables checks before constraint exclusion see, that table not needed

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group