...
> 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