Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id A557F9FB32A for ; Thu, 5 Oct 2006 15:21:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 62036-06-2 for ; Thu, 5 Oct 2006 15:21:17 -0300 (ADT) X-Greylist: delayed 00:17:51.430192 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id A4E499FB407 for ; Thu, 5 Oct 2006 15:20:44 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from fletch.stackdump.local (unknown [64.207.29.137]) by svr4.postgresql.org (Postfix) with ESMTP id CF65D5AF908 for ; Thu, 5 Oct 2006 18:02:52 +0000 (GMT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: pg_dump/pg_restore problem x-mimeole: Produced By Microsoft Exchange V6.5 Date: Thu, 5 Oct 2006 12:02:50 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: pg_dump/pg_restore problem Thread-Index: AcboOYYfW2rMKB1nSQSRro4VuF6n1wAbY+6w From: "Benjamin Krajmalnik" To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, SPF_SOFTFAIL X-Spam-Level: X-Archive-Number: 200610/31 X-Sequence-Number: 23334 I have a database which has UTF8 encoding enabled (why? I am really not sure why I did tihs other than the source of the data is windows and I had some issues with characters > ascii 128 being sent across from some of the Windows event logs). The problem which I am having is as follows: =20 The data is passed via the ODBC driver to a stored procedue, and it made it successfully into the tables. I can create a pg_dump without any problem, but pg_restore is giving the following error: =20 pg_restore: ERROR: invalid byte sequence for encoding "UTF8": 0x80 CONTEXT: COPY tblksalerts, line 22736 I have tried running pg_dump changing the encoding to Latin1 and Latin9. When creating the dunp, it is giving an error that there is no equivalent in the character set. The problem is that, as it stands, pg_dump/pg_restore cannot be used to easily backup/restore. In the past, I perfrmd singe table dumps and ran them so I could identify which line was the problem, went back to the database, deleted the offending line, and so forth, but this is a very long process. I was initially runnin 8.1.2. I am now running 8.1.4. I was hoping that 8.1.4 would alleviate the problem (since some encoding issues were addressed). Any ideas how to easily identify the offending rows and remove them easily? I need to move the database to a new server with higher performance, and this is currently a sticking point. =20