git.iko.soy/typeable/postgresql-simple
on master help sign in
Use typeinfo when getting the typeOid from a Field
cfbdca9Bas van Dijk
src/Database/PostgreSQL/Simple/Internal.hs+1−2
@@ -82,8 +82,7 @@ format :: Field -> PQ.Format
82format Field{..} = unsafePerformIO (PQ.fformat result column)
82format Field{..} = unsafePerformIO (PQ.fformat result column)
83
83
84typeOid :: Field -> PQ.Oid
84typeOid :: Field -> PQ.Oid
85−typeOid Field{..} = unsafePerformIO (PQ.ftype result column)
85+typeOid = typoid . typ . typeinfo
86−
87
86
88data Connection = Connection {
87data Connection = Connection {
89 connectionHandle :: {-# UNPACK #-} !(MVar PQ.Connection)
88 connectionHandle :: {-# UNPACK #-} !(MVar PQ.Connection)