From: | Thomas Lockhart <lockhart(at)fourpalms(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | thomas(at)pgsql(dot)com, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: timestamp resolution? |
Date: | 2001-10-04 17:46:38 |
Message-ID: | 3BBCA07E.676AAE07@fourpalms.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 2001-10-04 17:51:58 | Re: cvs problem |
Previous Message | Laurette Cisneros | 2001-10-04 17:46:10 | Re: Timestamp, fractional seconds problem |