pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Schroepfer <mike@raplix.com>
To: pgsql-general@postgresql.org.pgsql-sql
Subject: Timestamp Resolution in Postgres
Date: Thu, 3 May 2001 11:36:02 -0700
Message-ID: <9cs8hn$125n$1@news.tht.net> (raw)

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









view thread (3+ messages)  latest in thread

Message-ID: <9cs8hn$125n$1@news.tht.net>
Permalink:  ../9cs8hn$125n$1@news.tht.net/
Also on:    postgresql.org/message-id/9cs8hn$125n$1@news.tht.net

 · 

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-sql@postgresql.org
  Cc: mike@raplix.com, pgsql-general@postgresql.org.pgsql-sql
  Subject: Re: Timestamp Resolution in Postgres
  In-Reply-To: <9cs8hn$125n$1@news.tht.net>
  References: <9cs8hn$125n$1@news.tht.net>

* 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