From: | Thomas Lockhart <lockhart(at)fourpalms(dot)org> |
---|---|
To: | Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: timestamp resolution? |
Date: | 2001-10-04 05:48:14 |
Message-ID: | 3BBBF81E.C3EA31C7@fourpalms.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Is this an expected behavior? I could not see why t1 and t2 are
> showing different time resolutions...
Even stranger, this only happens on the first call to CURRENT_TIMESTAMP
after starting a backend (example below), and stays that way if I just
do "select current_timestamp". Something must not be initialized quite
right, but I don't know what. Any guesses?
- Thomas
(backend already connected and have just dropped t1)
thomas=# create table t1 (d1 timestamp(2), d2 timestamp(2) default
current_timestamp);
CREATE
thomas=# insert into t1 values (current_timestamp);
INSERT 16572 1
thomas=# select * from t1;
d1 | d2
---------------------------+---------------------------
2001-10-04 05:37:12.09+00 | 2001-10-04 05:37:12.09+00
(1 row)
thomas=# \q
myst$ psql
...
thomas=# insert into t1 values (current_timestamp);
INSERT 16573 1
thomas=# select * from t1;
d1 | d2
---------------------------+---------------------------
2001-10-04 05:37:12.09+00 | 2001-10-04 05:37:12.09+00
2001-10-04 05:37:40+00 | 2001-10-04 05:37:39.72+00
(2 rows)
thomas=# insert into t1 values (current_timestamp);
INSERT 16574 1
thomas=# select * from t1;
d1 | d2
---------------------------+---------------------------
2001-10-04 05:37:12.09+00 | 2001-10-04 05:37:12.09+00
2001-10-04 05:37:40+00 | 2001-10-04 05:37:39.72+00
2001-10-04 05:38:08.33+00 | 2001-10-04 05:38:08.33+00
(3 rows)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 2001-10-04 06:34:01 | Re: My last ECPG commit |
Previous Message | Tatsuo Ishii | 2001-10-04 04:51:11 | timestamp resolution? |