X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 441E25E49E6 for ; Sat, 4 Sep 2004 04:40:38 +0100 (BST) 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 97570-09 for ; Sat, 4 Sep 2004 03:40:33 +0000 (GMT) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by svr1.postgresql.org (Postfix) with ESMTP id D77415E4EFA for ; Sat, 4 Sep 2004 04:24:38 +0100 (BST) Received: from lorax.kcilink.com (lorax.kciLink.com [206.112.95.1]) by svr4.postgresql.org (Postfix) with ESMTP id 5C5795B0ABF for ; Fri, 3 Sep 2004 19:43:46 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by lorax.kcilink.com (Postfix) with ESMTP id 3C2014025 for ; Fri, 3 Sep 2004 15:42:45 -0400 (EDT) Received: from lorax.kcilink.com ([127.0.0.1]) by localhost (lorax.kcilink.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 91299-02 for ; Fri, 3 Sep 2004 15:42:44 -0400 (EDT) Received: by lorax.kcilink.com (Postfix, from userid 8) id AA86D4003; Fri, 3 Sep 2004 15:42:44 -0400 (EDT) To: pgsql-performance@postgresql.org Path: not-for-mail From: Vivek Khera Newsgroups: ml.postgres.performance Subject: restoring to wrong encoding db Date: Fri, 03 Sep 2004 15:42:44 -0400 Organization: Khera Communications, Inc., Rockville, MD Lines: 23 Message-ID: NNTP-Posting-Host: yertle.kcilink.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: lorax.kcilink.com 1094240564 1474 65.205.34.180 (3 Sep 2004 19:42:44 GMT) X-Complaints-To: daemon@kciLink.com NNTP-Posting-Date: Fri, 3 Sep 2004 19:42:44 +0000 (UTC) User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Security Through Obscurity, berkeley-unix) Cancel-Lock: sha1:MtgJ+EpPcLNxIP/sKpPQQ977/GA= X-Virus-Scanned: by amavisd-new at kcilink.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/20 X-Sequence-Number: 8148 I was just copying a database that was in UNICODE encoding into a new db for some testing. I hand't realized it was UNICODE and when it hit some funky chinese data (from some spam that came in...) it errored out with a string too long for a varchar(255). The dump was created on PG 7.4.3 with "pg_dump -Fc" The db was created with "createdb rt3" The restore was to PG 7.4.5 with "pg_restore --verbose -d rt3 rt3.dump" Is there some way for the dump to notice that the encoding is wrong in the db into which it is being restored? Once I created the rt3 db with encoding='UNICODE' it worked just fine. Should there be some kind of check like that? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D. Khera Communications, Inc. Internet: khera@kciLink.com Rockville, MD +1-301-869-4449 x806 AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/