From: | Philip Crotwell <crotwell(at)seis(dot)sc(dot)edu> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Cc: | Philip Crotwell <crotwell(at)seis(dot)sc(dot)edu> |
Subject: | JDBC, Timestamp and getting microseconds |
Date: | 2000-12-08 03:17:06 |
Message-ID: | Pine.GSO.4.10.10012072146510.3465-100000@tigger.seis.sc.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Hi
I have an application storing seismology data that needs to store
Timestamps (or something similar) with at least tenth of millisecond
precision. The docs for postgres 7.0 say that Timestamp has "1 microsec /
14 digits" resolution, and the JDBC Timestamp has room for nanoseconds, so
I thought I was fine.
But from looking at the jdbc ResultSet code, it seems that everything is
chopped off at hundredths of a second??? I also looked into the code for
ResultSet.getTIme, thinking that I could store the date and time
separately, but it seems to chop it off at even seconds.
I have played a little bit with datestyle and psql and I suspect that this
may not directly be a jdbc problem as they seem to chop at hundredths as
well. So, is there any way to get a higher precision Timestamp (or
equivalent) in and out of postgres with jdbc without loosing resolution or
resorting to putting in my own format (maybe long micros since 1970)?
And what does 1 microsec / 14 digits mean?
thanks,
Philip
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 2000-12-08 04:36:26 | Re: v7.1 beta 1 ...packaged, finally ... |
Previous Message | Joel Burton | 2000-12-08 02:15:21 | Re: v7.1 beta 1 (ODBC driver?) |