pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Radoslaw Stachowiak <radek@alter.pl>
To: pgsql-admin@postgresql.org
Subject: strange behaviour of gettimeofday() and pg_dump
Date: Tue, 6 Nov 2001 18:57:05 +0100
Message-ID: <20011106185705.Q7681@blue.alter.pl> (raw)

Intro data:
1. table with one (from many) columns:
 timestamp       | timestamp with time zone | not null default timeofday()

 used because I need better time resultion than just second provided by
 use of now().
2. pg_dump database > file

now, in such file, there are somtimes (it depends on specific data)
entries like this (only this column): 07:32:60  <- 60 seconds!

and such dump is useless for 'cat file|pgsql database' beacuse psql
refuses such entries.

Looks like that one of them (pg_dump or psql) should be fixed to match
the other. Please look, that column has strict type (timestamp with time zone)

this is postgresql 7.1.3 speaking ;-)

any help/info appreciated.

so far, I just correct this errors by hand before loading db (which
occurs very seldom). BTW, Ive seen entries like: 6:59:60, which are hard
to automated, because the change touches even an hour.

-- 
radoslaw.stachowiak.........................................http://alter.pl/



view thread (2+ messages)  latest in thread

Message-ID: <20011106185705.Q7681@blue.alter.pl>
Permalink:  ../20011106185705.Q7681@blue.alter.pl/
Also on:    postgresql.org/message-id/20011106185705.Q7681@blue.alter.pl

 · 

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: radek@alter.pl
  Subject: Re: strange behaviour of gettimeofday() and pg_dump
  In-Reply-To: <20011106185705.Q7681@blue.alter.pl>
  References: <20011106185705.Q7681@blue.alter.pl>

* 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