@@ -30,7 +30,7 @@ import Data.ByteString (ByteString)
3030import Data.Int (Int8, Int16, Int32, Int64)
3131import Data.List (intersperse)
3232import Data.Monoid (mappend)
33−import Data.Time (Day, TimeOfDay, LocalTime, UTCTime, ZonedTime)
33+import Data.Time (Day, TimeOfDay, LocalTime, UTCTime, ZonedTime, NominalDiffTime)
3434import Data.Typeable (Typeable)
3535import Data.Word (Word, Word8, Word16, Word32, Word64)
3636import {-# SOURCE #-} Database.PostgreSQL.Simple.ToRow
@@ -225,6 +225,7 @@ instance ToField LT.Text where
225225 toField = toField . LT.toStrict
226226 {-# INLINE toField #-}
227227
228+
228229instance ToField UTCTime where
229230 toField = Plain . inQuotes . utcTimeToBuilder
230231 {-# INLINE toField #-}
@@ -261,6 +262,10 @@ instance ToField Date where
261262 toField = Plain . inQuotes . dateToBuilder
262263 {-# INLINE toField #-}
263264
265+instance ToField NominalDiffTime where
266+ toField = Plain . inQuotes . nominalDiffTimeToBuilder
267+ {-# INLINE toField #-}
268+
264269instance (ToField a) => ToField (PGArray a) where
265270 toField xs = Many $
266271 Plain (fromByteString "ARRAY[") :