Bug in UTF8-Validation Code?

From: Mario Weilguni <mweilguni(at)sime(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Bug in UTF8-Validation Code?
Date: 2007-03-13 11:00:58
Message-ID: 200703131200.58918.mweilguni@sime.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I've a problem with a database, I can dump the database to a file, but
restoration fails, happens with 8.1.4.

Steps to reproduce:
create database testdb with encoding='UTF8';
\c testdb
create table test(x text);
insert into test values ('\244'); ==> Is akzepted, even if not UTF8.

pg_dump testdb -f testdb.dump -Fc
pg_restore -f testdb.dump -d testdb => fails with an error:
ERROR: invalid byte sequence for encoding "UTF8": 0xa4

The problem itself comes from a CSV file, which is imported with \copy without
proper quoting (so I have to fix this anyway), but I still think this is an
error, making restoration very complicated in such cases...

Or am I doing something completly wrong here?

Best regards,
Mario Weilguni

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2007-03-13 13:46:07 Re: [COMMITTERS] pgsql: Make configuration parameters fall back to their default values
Previous Message Simon Riggs 2007-03-13 10:08:04 Re: Bug: Buffer cache is not scan resistant