git.iko.soy/typeable/postgresql-simple
on master help sign in
Use typeinfo when getting the typeOid from a Field
commitcfbdca93d3f7b7ba5d690635e7590d72ff485f30 authorBas van Dijk <v.dijk.bas@gmail.com> dateWed 1 Aug 2012, 13:11 (14 years ago) parentd7475b8
1 file changed+1−2
src/Database/PostgreSQL/Simple/Internal.hs+1−2
src/Database/PostgreSQL/Simple/Internal.hs+1−2
@@ -82,8 +82,7 @@ format :: Field -> PQ.Format
8282format Field{..} = unsafePerformIO (PQ.fformat result column)
8383
8484typeOid :: Field -> PQ.Oid
85−typeOid Field{..} = unsafePerformIO (PQ.ftype result column)
86−
85+typeOid = typoid . typ . typeinfo
8786
8887data Connection = Connection {
8988 connectionHandle :: {-# UNPACK #-} !(MVar PQ.Connection)