Re: Restore postgres database problem - Mailing list pgsql-admin

From Michael Fuhr
Subject Re: Restore postgres database problem
Date
Msg-id 20050128054818.GA95253@winnie.fuhr.org
Whole thread Raw
In response to Restore postgres database problem  (Inpreet Singh <Singh.Inpreet@netsity.com>)
List pgsql-admin
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/

pgsql-admin by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Restore postgres database problem
Next
From: prabhath g
Date:
Subject: Re: [pgsql-chat] Installation of pgsql 8.0 on windows