[Haskell-cafe] Re: programmatic DB interface?

Colin Paul Adams colin at colina.demon.co.uk
Fri Feb 5 10:10:26 EST 2010


>>>>> "Johannes" == Johannes Waldmann <waldmann at imn.htwk-leipzig.de> writes:

    >> That is exactly the problem - it is wrong for CalendarT.

    Johannes> what do you mean by "it" ... what package should be fixed
    Johannes> (old-locale, haskelldb-hdbc-postgreqsl, ...)?  Because
    Johannes> obviously something seems broken here.

"It" is the use of unzoned times. I sent the following patch to the
haskelldb list several months ago. But there has not been a new release
since then.

    Colin> It is just the code to generate the SQL for CREATE TABLE is
    Colin> presumably faulty. For CalendarTimeT columns it should
    Colin> generate a time of

    Colin> timestamp with time zone

    Colin> as CalendarTime is a zoned timestamp.

here's my patch:

--- Default.hs~	2009-02-13 23:06:25.000000000 +0000
+++ Default.hs	2009-10-01 16:43:34.000000000 +0100
@@ -92,7 +92,7 @@
       IntegerT      -> SqlType "bigint"
       DoubleT       -> SqlType "double precision"
       BoolT         -> SqlType "bit"
-      CalendarTimeT -> SqlType "timestamp"
+      CalendarTimeT -> SqlType "timestamp with time zone"
       BStrT a       -> SqlType1 "varchar" a
-- 
Colin Adams
Preston Lancashire


More information about the Haskell-Cafe mailing list