Thread: Preserving Timestamp Information

Preserving Timestamp Information

From
Lola Lee
Date:
How can I preserve timestamp for a set of data?  I'm using PostgreSQL
8.02.  I had to do a dump of my database and then at a later date I
imported the data I had in several tables.  Here's an example:

yw_id      weight  yarnweight_lud
--
1    Cobweb    2005-01-13 15:21:50.654149
2    Lace Weight    2005-01-13 15:21:50.654149
3    Sock    2005-01-13 15:21:50.654149

When I use the import wizard for Aqua Data Studio, it sets all values
for yarnweight_lud to NULL.

I can create insert queries for all of these if I have to but I need to
know how to force preservation of the time stamp.

--
Lola - mailto:lola@his.com
http://www.lolajl.net | Blog at http://www.lolajl.net/blog/
Terrorismus delendus est! (Terrorism must be destroyed utterly!)
I'm in Bowie, MD, USA, halfway between DC and Annapolis.

Re: Preserving Timestamp Information

From
Tom Lane
Date:
Lola Lee <lola@his.com> writes:
> How can I preserve timestamp for a set of data?  I'm using PostgreSQL
> 8.02.  I had to do a dump of my database and then at a later date I
> imported the data I had in several tables.  Here's an example:

> yw_id      weight  yarnweight_lud
> --
> 1    Cobweb    2005-01-13 15:21:50.654149
> 2    Lace Weight    2005-01-13 15:21:50.654149
> 3    Sock    2005-01-13 15:21:50.654149

> When I use the import wizard for Aqua Data Studio, it sets all values
> for yarnweight_lud to NULL.

That sounds like a pretty brain-dead "wizard".

Why don't you just use the dump file as it was designed to be used,
ie, feed it to pg_dump (or pg_restore, depending on format).

            regards, tom lane

Re: Preserving Timestamp Information

From
Tom Lane
Date:
I wrote:
> Why don't you just use the dump file as it was designed to be used,
> ie, feed it to pg_dump (or pg_restore, depending on format).

Argh, not enough caffeine yet --- of course that should read
"ie, feed it to psql (or pg_restore, depending on format)."

            regards, tom lane