Re: timestamp resolution?
От | Thomas Lockhart |
---|---|
Тема | Re: timestamp resolution? |
Дата | |
Msg-id | 3BBBF81E.C3EA31C7@fourpalms.org обсуждение исходный текст |
Ответ на | timestamp resolution? (Tatsuo Ishii <t-ishii@sra.co.jp>) |
Ответы |
Re: timestamp resolution?
|
Список | 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+002001-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+002001-10-04 05:37:40+00 | 2001-10-04 05:37:39.72+002001-10-04 05:38:08.33+00 | 2001-10-04 05:38:08.33+00 (3 rows)
В списке pgsql-hackers по дате отправления: