X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CA05D3A6205 for ; Fri, 28 Jan 2005 06:35:14 +0000 (GMT) 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 08392-08 for ; Fri, 28 Jan 2005 06:35:06 +0000 (GMT) Received: from mail.netsity.com (unknown [61.246.180.169]) by svr1.postgresql.org (Postfix) with ESMTP id 37C023A61E1 for ; Fri, 28 Jan 2005 06:35:05 +0000 (GMT) Received: by mail.netsity.com with Internet Mail Service (5.5.2653.19) id ; Fri, 28 Jan 2005 12:05:18 +0530 Received: from ISINGH ([192.168.103.60]) by mail.netsity.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id D3CHCKH4; Fri, 28 Jan 2005 12:05:15 +0530 From: Inpreet Singh To: Michael Fuhr Cc: pgsql-admin@postgresql.org Message-ID: <008c01c50503$868326b0$3c67a8c0@netsity.com> References: <006d01c5029a$38fb4e60$3c67a8c0@netsity.com> <20050125213847.GA95908@winnie.fuhr.org> <00bc01c50431$c3997590$3c67a8c0@netsity.com> <20050128050415.GA70681@winnie.fuhr.org> <004a01c504fa$8388e890$3c67a8c0@netsity.com> <20050128054818.GA95253@winnie.fuhr.org> Subject: Re: Restore postgres database problem Date: Fri, 28 Jan 2005 12:05:14 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.088 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/296 X-Sequence-Number: 16155 Yes dos2unix worked absolutely fine. I got the solution of my problem. Thanks alot for your co-operation. I am using Linux Red hat 9 and my client is also using the same platform but when he emailed me this sql file he first saved file on windows and then I saved it on windows and saved n run on linux So I think this procedure leads to carriage return. but dos2unix command sorted out the problem. ----- Original Message ----- From: "Michael Fuhr" To: "Inpreet Singh" Cc: Sent: Friday, January 28, 2005 11:18 AM Subject: Re: [ADMIN] Restore postgres database problem > On Fri, Jan 28, 2005 at 11:00:44AM +0530, Inpreet Singh wrote: > > > Yes it returning carriage returns. I am pasting below the output to the > > command u send to me > > > > *******Linux Prompt********************** > > [root@localhost inpreet]# head postgres.sql | cat -v > > --^M > > -- PostgreSQL database cluster dump^M > > --^M > > You could strip the carriage returns with tr, sed, perl, dos2unix, > etc. Here's an example: > > tr -d '\r' < postgres.sql > fixed.sql # or pipe into psql > > What kind of system did you create the dump on? How did you transfer > the file? If you can figure out how the carriage returns got there > then you might be able to prevent it from happening in the future. > > -- > Michael Fuhr > http://www.fuhr.org/~mfuhr/ >