Skip site navigation (1) Skip section navigation (2)

Re: Restore postgres database problem

From: Inpreet Singh <Singh(dot)Inpreet(at)netsity(dot)com>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Restore postgres database problem
Date: 2005-01-28 06:35:14
Message-ID: 008c01c50503$868326b0$3c67a8c0@netsity.com (view raw or flat)
Thread:
Lists: pgsql-admin
Yes dos2unix <postgres.sql> 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" <mike(at)fuhr(dot)org>
To: "Inpreet Singh" <Singh(dot)Inpreet(at)netsity(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
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(at)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/
>

In response to

pgsql-admin by date

Next:From: prabhath gDate: 2005-01-28 14:18:05
Subject: Re: [pgsql-chat] Installation of pgsql 8.0 on windows
Previous:From: Michael FuhrDate: 2005-01-28 05:48:18
Subject: Re: Restore postgres database problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group