| From: | "Michael Schroepfer" <mike(at)raplix(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org(dot)pgsql-sql(at)postgresql(dot)org |
| Subject: | Timestamp Resolution in Postgres |
| Date: | 2001-05-03 18:36:02 |
| Message-ID: | 9cs8hn$125n$1@news.tht.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-sql |
Hi All,
Apologies if I posted to the wrong groups.
I am trying to use the timestamp column type in postgres. It appears that
postgres is rounding
the milliseconds to the nearest 10ms. I'm running on Solaris 8 - and my
app is written in
java which is returning dates with a 1ms accuracy. Is there a setting
somewhere to adjust
the resolution of the timestamp field? I haven't seen anything in the
documentation. Enclosed below
is a simple example which exhibits the behavior.
Thanks for any help!
Mike
Let's say I have a table called person:
create table person (
OBJECTID VARCHAR( 56),
BIRTHDAY TIMESTAMP,
NAME VARCHAR(256)
);
If I run the following command in psql:
update table person set birthday = '2001-05-03 11:12:56.343' where objectid
= '34';
followed by
select * from person where objectid = '34';
I get :
2001-05-03 11:12:56.34-07
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Lieven Van Acker | 2001-05-03 18:52:40 | Re: View permissions in 7.1 |
| Previous Message | Joel Burton | 2001-05-03 18:29:15 | Re: ODBC 3.0 functions (UCASE, LCASE, etc.) |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2001-05-03 19:22:28 | Re: How to encode and decode password in pgsql !! |
| Previous Message | Tom Lane | 2001-05-03 18:32:56 | Re: '13 months ago'::reltime |