Re: timestamp resolution?

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: timestamp resolution?
Дата
Msg-id 3BBCA07E.676AAE07@fourpalms.org
обсуждение исходный текст
Ответ на timestamp resolution?  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Ответы Re: timestamp resolution?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
...
> Ah, I've got it.  Two problems: AdjustTimestampForTypmod is one brick
> shy of a load, and the hardwired calls to timestamp_in and friends
> weren't passing all the parameters they should.  (Can anyone think of
> a way for DirectFunctionCall to do any checking?)

OK, I found the second item last night, but am not sure why
AdjustTimestampForTypmod needs more fixes.

I'm going through gram.y and fixing up the implementations of
CURRENT_TIMESTAMP et al. One point folks will run into is that
CURRENT_TIMESTAMP *should* return time to the second, not fractions
thereof, and CURRENT_TIMESTAMP(p) should be used to get something more
precise. Another issue I just noticed is that the result of

create table t1 (d timestamp(2) default current_timestamp);

gives me two decimal points of fractional seconds (after fixups for
Tatsuo's reported troubles) but I would think that it should round to
the second. Looks like we are "type folding" past the typmod attributes.
Comments?
                     - Thomas


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: [COMMITTERS] pgsql/src/backend parser/parse_coerce.c utils/ ...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql/src/backend parser/parse_coerce.c utils/ ...