From: | Thomas Lockhart <lockhart(at)fourpalms(dot)org> |
---|---|
To: | Barry Lind <barry(at)xythos(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: [HACKERS] Timestamp, fractional seconds problem |
Date: | 2001-10-04 20:13:17 |
Message-ID: | 3BBCC2DD.9F27E153@fourpalms.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers 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
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 2001-10-04 20:17:18 | Re: timestamp resolution? |
Previous Message | Tom Lane | 2001-10-04 19:16:24 | Re: Patch for fixing a few memory leaks |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-10-04 20:48:37 | Re: Timestamp, fractional seconds problem |
Previous Message | Laurette Cisneros | 2001-10-04 18:59:44 | Re: Timestamp, fractional seconds problem |