X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 1ECC09DCB28 for ; Fri, 17 Feb 2006 02:19:55 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 40173-06 for ; Fri, 17 Feb 2006 02:19:54 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id DD6D39DCACD for ; Fri, 17 Feb 2006 02:19:52 -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 k1H6Jaql005529; Fri, 17 Feb 2006 01:19:36 -0500 (EST) To: "Gregory S. Williamson" cc: pgsql-admin@postgresql.org Subject: Re: Something like pg_dump for 7.4 In-reply-to: <71E37EF6B7DCC1499CEA0316A2568328024BBF9D@loki.wc.globexplorer.net> References: <71E37EF6B7DCC1499CEA0316A2568328024BBF9D@loki.wc.globexplorer.net> Comments: In-reply-to "Gregory S. Williamson" message dated "Thu, 16 Feb 2006 21:11:13 -0800" Date: Fri, 17 Feb 2006 01:19:35 -0500 Message-ID: <5528.1140157175@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.11 required=5 tests=[AWL=0.110] X-Spam-Score: 0.11 X-Spam-Level: X-Archive-Number: 200602/207 X-Sequence-Number: 20628 "Gregory S. Williamson" writes: > I am trying to migrate a modest sized database (the unload file is just under a gigabyte) which is moderately complex, using schemas and the like from 7.4 to 8.1 > Alas, pg_dump appears to incompatable with my needs as it keeps introducing invalid UTF-8 characters. It's quite unlikely that pg_dump is at fault. Rather the data you are dumping is probably wrong. There were some errors in pre-8.1 versions that caused them to accept byte sequences that are not actually legal UTF8 strings. 8.1 has tightened up that code and so will reject data that 7.4 thought was legal. Check the archives for some previous discussions about reasonable ways to fix bad data --- I seem to recall iconv being mentioned as one possible filter for your dump file. > Is there any way to do this ? I can't edit the resulting dump file by hand -- it's huge. And pg_dump on 7.4 does not know how to a table inside a schema -- it seems to be all or nothing. You could use the 8.1 pg_dump against the 7.4 server if you need more flexibility. regards, tom lane