Re: [HACKERS] Timestamp, fractional seconds problem
От | Thomas Lockhart |
---|---|
Тема | Re: [HACKERS] Timestamp, fractional seconds problem |
Дата | |
Msg-id | 3BBCC2DD.9F27E153@fourpalms.org обсуждение исходный текст |
Ответ на | Re: [HACKERS] Timestamp, fractional seconds problem (Barry Lind <barry@xythos.com>) |
Список | pgsql-jdbc |
> Can you explain more how this functionality has changed? I know that in > the JDBC driver fractional seconds are assumed to be two decimal places. > If this is no longer true, I need to understand the new symantics so > that the JDBC parsing routines can be changed. Other interfaces may > have similar issues. OK. (Remember that the new behaviors can be changed if this doesn't work for you). Formerly, all times had either zero or two fractional decimal places. Now, times are explicitly truncated to their defined precision at a few specific points in processing (e.g. when reading a literal constant or when storing into a column). At all other points in processing, the values are allowed to take on whatever fractional digits might have come from math operations or whatever. The output routines now write the maximum number of fractional digits reasonably present for a floating point number (10 for time, should be but isn't less for timestamp) and then trailing zeros are hacked out, two digits at a time. The regression tests produced basically the same results as always, once the time and timestamp columns were defined to be "time(2)" or "timestamp(2)". But there is definitely the possibility of more precision than before in the output string for time fields. - Thomas
В списке pgsql-jdbc по дате отправления: