X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7F606DA9C4 for ; Tue, 1 Nov 2005 17:21:39 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38969-04 for ; Tue, 1 Nov 2005 21:21:37 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 08C86DB73F for ; Tue, 1 Nov 2005 17:21:37 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id jA1LLXxE028280; Tue, 1 Nov 2005 16:21:34 -0500 (EST) To: "Peter Darley" Cc: "Pgsql-Admin" Subject: Re: Can't dump and restore In-reply-to: References: Comments: In-reply-to "Peter Darley" message dated "Tue, 01 Nov 2005 10:52:20 -0800" Date: Tue, 01 Nov 2005 16:21:33 -0500 Message-ID: <28279.1130880093@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.006 required=5 tests=[AWL=0.006] X-Spam-Score: 0.006 X-Spam-Level: X-Archive-Number: 200511/11 X-Sequence-Number: 19384 "Peter Darley" writes: > I'm having some trouble restoring data that was dumped from my database. > When I dump out a table (pg_dump -d neo -t question > question.tbl) and try > to restore it (psql -d temp -f question.tbl) I get errors on certain rows: > "psql:question.tbl:15861: ERROR: invalid byte sequence for encoding > "UNICODE": 0xe96520". This happens when I use SQL_ASCII or UNICODE as the > encoding. I didn't try any other encodings. Er, what is the encoding of the source database, exactly? Is it the same as the encoding of the destination database? SQL_ASCII disables all encoding checks, so it's entirely plausible that you would have byte sequences that are not legal Unicode in a SQL_ASCII database. If so, there's not much to do except manually clean up the bogus data. Also, if you're trying to restore into PG 8.1 from an older version, we've fixed some mistakes in the Unicode encoding checker, so there actually are differences in what the code will accept :-( regards, tom lane