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

From Michael Fuhr
Subject Re: Restore postgres database problem
Date
Msg-id 20050128050415.GA70681@winnie.fuhr.org
Whole thread Raw
In response to Restore postgres database problem  (Inpreet Singh <Singh.Inpreet@netsity.com>)
List pgsql-admin
On Thu, Jan 27, 2005 at 11:03:43AM +0530, Inpreet Singh wrote:

> *Taken Dump :*   /usr/bin/pg_dumpall > /home/inpreet/postgres.sql  /*which
> was taken at client site*/
>
> *Restoring Dump :*   su - postgres /*This process I am doing at local site
> 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 columns
> have values like
> ""2004-10-09 10:03:36.689993"". So is it possible that when I am restoring
> values this columns are creating all sort of trouble??? as timestamp field
> means date time at the time of insertion of record and I am trying to insert
> 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
http://www.fuhr.org/~mfuhr/

pgsql-admin by date:

Previous
From: "M.V. Jaga Mohan"
Date:
Subject: Database Scalability
Next
From: Michael Fuhr
Date:
Subject: Re: Restore postgres database problem