| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org> |
| Cc: | Dave Cramer <pg(at)fastcrypt(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: roundoff problem in time datatype |
| Date: | 2005-09-26 15:49:40 |
| Message-ID: | 29688.1127749780@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-patches |
Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org> writes:
> Do the sql standard say anything on the matter?
It doesn't seem very helpful. AFAICS, we should interpret storing
'23:59:59.99' into a TIME(0) field as a cast from TIME(2) to TIME(0),
and the spec defines that as
15) If TD is the datetime data type TIME WITHOUT TIME ZONE, then let
TSP be the <time precision> of TD.
b) If SD is TIME WITHOUT TIME ZONE, then TV is SV, with
implementation-defined rounding or truncation if necessary.
So it's "implementation-defined" what we do.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2005-09-26 15:53:56 | Re: [HACKERS] statement logging / extended query protocol issues |
| Previous Message | Tom Lane | 2005-09-26 15:46:47 | Re: roundoff problem in time datatype |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2005-09-26 15:53:56 | Re: [HACKERS] statement logging / extended query protocol issues |
| Previous Message | Tom Lane | 2005-09-26 15:46:47 | Re: roundoff problem in time datatype |