X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id BA6CAD1DD1F for ; Tue, 17 Feb 2004 22:24:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 68228-04 for ; Tue, 17 Feb 2004 18:24:05 -0400 (AST) Received: from bettong.westnet.com.au (bettong.westnet.com.au [203.10.1.8]) by svr1.postgresql.org (Postfix) with ESMTP id DAC80D1DD42 for ; Tue, 17 Feb 2004 18:24:01 -0400 (AST) Received: from localhost (bettong [127.0.0.1]) by localhost (Postfix) with ESMTP id 352905FECF; Wed, 18 Feb 2004 06:24:02 +0800 (WST) Received: from mapping12 (dsl-202-173-140-108.sa.westnet.com.au [202.173.140.108]) by bettong.westnet.com.au (Postfix) with ESMTP id 69CF15FEEF; Wed, 18 Feb 2004 06:24:01 +0800 (WST) Reply-To: From: "Benjamin Wragg" To: "'Bruce Momjian'" , "'Mike Miller'" Cc: Subject: Re: Restoring pg_dump's made using COPY commands Date: Wed, 18 Feb 2004 08:58:24 +1030 Organization: ISA Solutions Message-ID: <002401c3f5a5$5be3a380$0200a8c0@mapping12> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 In-Reply-To: <200402171619.i1HGJ2c18481@candle.pha.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/262 X-Sequence-Number: 12436 I had this problem just yesterday. I found it was due to an error a few lines before my copy command started. -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Bruce Momjian Sent: Wednesday, 18 February 2004 2:49 AM To: Mike Miller Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Restoring pg_dump's made using COPY commands Mike Miller wrote: > Hi, > I'm trying to restore two dumps, one from 7.1.3 and the other from a > 6.5.3 > series PgSQL server. These dumps were both made using standard 'pg_dump > > output' commands (specifying the host where needed on one of them). When I > run the database restore by doing execute-file in psql, piping the file to > psql, or even attempting pg_restore (whcih doesn't work on these plain text > databases), I receive messages pertaining to: > invalid command \N > invalid command \. > parse error at the end of line > > > However this dump just came from a pg_dump, so it really should be > working. > I've tried every combination of pg_dump and psql versions from 7.4.1, 7.3.3, > 7.1.3, 6.5.3 in order to get this to work right without any luck. > > Can anyone help me out with what is wrong? I'm looking to make this a > backup method, and if I can't restore the data, it doesn't do me much good > (and I'm trying to restore some existing data). Ultimately want to move > them all up to 7.4.x > > Any ideas as to what causes these errors? Anything I can do to fix > the > output of pg_dump? Strange. We used \N for NULLs way back in 6.5 and earlier. I wonder if you have carriage returns in the file accidentally. Any way to see the lines that are failing? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly