[Pkg-haskell-maintainers] Bug#596183: libghc6-hdbc-postgresql-dev: Conversion for SqlIntervalT in makeSqlValue doesn't handle intervals with days

Josh Triplett josh at joshtriplett.org
Thu Sep 9 02:24:01 UTC 2010


Package: libghc6-hdbc-postgresql-dev
Version: 2.2.3.1-4
Severity: normal
Tags: upstream

When HDBC-postgresql converts a SqlIntervalT to a SqlDiffTime in
makeSqlValue, it assumes hours:minutes:seconds, splits on ':', and tries
to use "read" to parse two Integer values and a Double.  However,
postgresql stores intervals internally as months, days, and seconds; the
separate days field allows for 23-hour or 25-hour days (thank you
daylight savings time).  For such intervals, postgresql outputs "N mons
N days N:N:N.N", with any of the three components omitted if zero.  This
causes HDBC-postgresql to fail in "read".

- Josh Triplett and Jamey Sharp





More information about the Pkg-haskell-maintainers mailing list