From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Jiří Pavlovský <jiri(at)pavlovsky(dot)eu> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: utf8 errors |
Date: | 2013-06-25 21:56:43 |
Message-ID: | CAFj8pRAvBs4qjfMqyqMJkX19rm84fMPtfZpp9S8JJA9C+oQ7HQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2013/6/25 Jiří Pavlovský <jiri(at)pavlovsky(dot)eu>:
> On 25.6.2013 21:39, Pavel Stehule wrote:
>> Hello
>>
>> in this mailing list is not high traffic,
>>
>> please try to ask on postgresql general mailing list
>>
>> http://www.postgresql.org/list/pgsql-general/
>>
>> or
>>
>> Czech google groups https://groups.google.com/forum/?hl=cs#!forum/postgresql-cz
>>
>> 2013/6/25 Jiří Pavlovský <jiri(at)pavlovsky(dot)eu>:
>>> Hello,
>>>
>>> I have a win32 application. It uses gtk for GUI and postgres. Recently I
>>> upgraded to newer gtk and postgres 9.2. I'm now getting utf8 errors from
>>> postgres.
>>> The thing I don't understand that the queries, which postgres complains
>>> about, seem to be perfectly valid.
>>>
>>> For example
>>> LOG: statement: INSERT INTO recipients (DealID,
>>> Contactid) VALUES (29009, 9387)
>>> ERROR: invalid byte sequence for encoding "UTF8": 0x9c
>>>
>> This message is strange - I expect so *ID columns are numeric. Can you
>> show a table definition?
>
> Yes, sure:
>
> CREATE TABLE recipients
> (
> contactid integer,
> dealid integer,
> CONSTRAINT "$1" FOREIGN KEY (contactid)
> REFERENCES contacts (contactid) MATCH SIMPLE
> ON UPDATE CASCADE ON DELETE CASCADE,
> CONSTRAINT recipients_dealid_fk FOREIGN KEY (dealid)
> REFERENCES subscription (dealid) MATCH SIMPLE
> ON UPDATE CASCADE ON DELETE CASCADE,
> CONSTRAINT recipients_dealid_key UNIQUE (dealid, contactid)
> )
>
There is some wrong - pg can raise this message when detect some error
in conversion between client encoding and server encoding. But you
speaking so your client encoding and database encoding is same, and
this situation should not be possible. So you should to recheck your
client encoding and real input.
In old versions Postgres don't check UTF well, so it was possible to
store some strange chars, but it is not possible now.
Pavel Stehule
> --
> Jiří Pavlovský
>
From | Date | Subject | |
---|---|---|---|
Next Message | James Sewell | 2013-06-26 01:47:06 | LDAP referrals |
Previous Message | Jiří Pavlovský | 2013-06-25 21:39:27 | Re: utf8 errors |