pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Inpreet Singh <Singh.Inpreet@netsity.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Restore postgres database problem
Date: Thu, 27 Jan 2005 22:04:15 -0700
Message-ID: <20050128050415.GA70681@winnie.fuhr.org> (raw)
In-Reply-To: <00bc01c50431$c3997590$3c67a8c0@netsity.com>
References: <006d01c5029a$38fb4e60$3c67a8c0@netsity.com>
	<20050125213847.GA95908@winnie.fuhr.org>
	<00bc01c50431$c3997590$3c67a8c0@netsity.com>

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/



view thread (9+ messages)  latest in thread

Message-ID: <20050128050415.GA70681@winnie.fuhr.org>
Permalink:  ../20050128050415.GA70681@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050128050415.GA70681@winnie.fuhr.org

 · 

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: mike@fuhr.org, Singh.Inpreet@netsity.com
  Subject: Re: Restore postgres database problem
  In-Reply-To: <20050128050415.GA70681@winnie.fuhr.org>
  References: <006d01c5029a$38fb4e60$3c67a8c0@netsity.com> <20050125213847.GA95908@winnie.fuhr.org> <00bc01c50431$c3997590$3c67a8c0@netsity.com> <20050128050415.GA70681@winnie.fuhr.org>

* 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