pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Inpreet Singh <Singh.Inpreet@netsity.com>
To: Michael Fuhr <mike@fuhr.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: Restore postgres database problem
Date: Fri, 28 Jan 2005 12:05:14 +0530
Message-ID: <008c01c50503$868326b0$3c67a8c0@netsity.com> (raw)
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>

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@fuhr.org>
To: "Inpreet Singh" <Singh.Inpreet@netsity.com>
Cc: <pgsql-admin@postgresql.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@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/
>



view thread (9+ messages)

Message-ID: <008c01c50503$868326b0$3c67a8c0@netsity.com>
Permalink:  ../008c01c50503$868326b0$3c67a8c0@netsity.com/
Also on:    postgresql.org/message-id/008c01c50503$868326b0$3c67a8c0@netsity.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: Singh.Inpreet@netsity.com, mike@fuhr.org
  Subject: Re: Restore postgres database problem
  In-Reply-To: <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> <008c01c50503$868326b0$3c67a8c0@netsity.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox