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

Re: Restore postgres database problem

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
Subject: Re: Restore postgres database problem
Date: 2005-01-28 05:48:18
Message-ID: 20050128054818.GA95253@winnie.fuhr.org (view raw or flat)
Thread:
Lists: 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(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

Responses

pgsql-admin by date

Next:From: Inpreet SinghDate: 2005-01-28 06:35:14
Subject: Re: Restore postgres database problem
Previous:From: Inpreet SinghDate: 2005-01-28 05:30:44
Subject: Re: Restore postgres database problem

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