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 05:30:44
Message-ID: 004a01c504fa$8388e890$ (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
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
-- PostgreSQL database cluster dump^M
\connect "template1"^M
-- Users^M

Now what should I do?

Inpreet Singh
----- 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 10:34 AM
Subject: Re: [ADMIN] Restore postgres database problem

> On Thu, Jan 27, 2005 at 11:03:43AM +0530, Inpreet Singh wrote:
> > *Taken Dump :*   /usr/bin/pg_dumpall > /home/inpreet/postgres.sql
> > was taken at client site*/
> >
> > *Restoring Dump :*   su - postgres /*This process I am doing at local
> > so thats why psql and dumpall are in diff directories*/
> >  /usr/local/pgsql/bin/psql -d template1 < /home/inpreet/postgres.sql
> Is the local site running the same version of PostgreSQL or a later
> version than the client site?  If you try to restore into an earlier
> version then you could have problems.
> How are you transferring the file from the client site to the local
> site?  Is it possible that the file was modified in transit?  I
> wonder if carriage returns have been added -- do you see ^M at the
> ends of lines when you run the following command?
> head postgres.sql | cat -v
> > Sir I have some table values which are of type timestamp and those
> > have values like
> > ""2004-10-09 10:03:36.689993"". So is it possible that when I am
> > values this columns are creating all sort of trouble??? as timestamp
> > means date time at the time of insertion of record and I am trying to
> > earlier date time.
> The "timestamp" type holds a date and time; PostgreSQL shouldn't
> care about the value as long as it's syntactically correct (although
> it's possible that a trigger or constraint might care).
> -- 
> Michael Fuhr

In response to


pgsql-admin by date

Next:From: Michael FuhrDate: 2005-01-28 05:48:18
Subject: Re: Restore postgres database problem
Previous:From: Michael FuhrDate: 2005-01-28 05:04:15
Subject: Re: Restore postgres database problem

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