From: Dario V. Fassi <software@sistemat.com.ar>
To: pg@fastcrypt.com
Cc: Greg Markham <gmarkham@markhamdirect.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: Timestamp Question
Date: Sun, 11 Jul 2004 16:18:44 -0300
Message-ID: <40F19294.8090700@sistemat.com.ar> (raw)
In-Reply-To: <1089552466.11544.311.camel@localhost.localdomain>
References: <40F012E4.3000001@markhamdirect.com>
<40F02556.1070109@sistemat.com.ar>
<1089552466.11544.311.camel@localhost.localdomain>
Dave Cramer wrote:
>the real question is where do you get microsecond values from in java,
>and are they real? In other words, if you are getting system time in
>microseconds ( if that's even possible ) it will take you a few more
>microseconds to insert it.
>
>Dave
>
>
Dave, it's true that in Java and PC hardware almost microseconds is the
max time discrimination possible.
But re-read my post (and excuse my horrible English),
I say that would help a lot if the microseconds part of a timestamp will
be zero padded to a minimum length of 5 or 6 digits.
Like:
"then most databases can take 2004-07-10 12:59:59.123 as 2004-07-10 12:59:59.123000 "
This behavior help is cross (vendor) database operations .
Dario.
>On Sat, 2004-07-10 at 13:20, Dario V. Fassi wrote:
>
>
>>Greg Markham wrote:
>>
>>
>>
>>>I have searched the archives and not found and answer to this question:
>>>
>>>I am trying to use a Java Timestamp object to create a Postgresql
>>>Timestamp(6) field. I can insert a Timestamp but it only goes to the
>>>millisecond(2004-07-10 12:59:59.123) I need it to the microsecond
>>>(2004-07-10 12:59:59.123456). Is there a way to do this?
>>>
>>>- Greg Markham
>>>
>>>
>>I have the same problem, and It's very molest in cross-dabase operations
>>(read in one and write in another vendor db).
>>
>>A workaround to this problem is create tables using "TIMESTAMP WITHOUT
>>TIMEZONE", then most databases can take 2004-07-10 12:59:59.123 as
>>2004-07-10 12:59:59.123000 , but the real value could be 2004-07-10
>>12:59:59.000123.
>>
>>I think that If the microseconds come zero padded , simplify many
>>things, even insert TIMESTAMP WITH TIMEZONE values on other databases
>>where timestamps is always represented in Local time (without timezone).
>>
>>Dario Fassi.
>>
>>
>>
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-jdbc@postgresql.org
Cc: software@sistemat.com.ar, pg@fastcrypt.com, gmarkham@markhamdirect.com
Subject: Re: Timestamp Question
In-Reply-To: <40F19294.8090700@sistemat.com.ar>
References: <40F012E4.3000001@markhamdirect.com> <40F02556.1070109@sistemat.com.ar> <1089552466.11544.311.camel@localhost.localdomain> <40F19294.8090700@sistemat.com.ar>
* 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