git.iko.soy/typeable/postgresql-simple
on master help sign in
Change implementation of typeOid to avoid unnecessary metaschema queries
de83238Leon P Smith
src/Database/PostgreSQL/Simple/Internal.hs+1−1
@@ -110,7 +110,7 @@ format Field{..} = unsafePerformIO (PQ.fformat result column)
110-- to libpq's @PQftype@.
110-- to libpq's @PQftype@.
111
111
112typeOid :: Field -> PQ.Oid
112typeOid :: Field -> PQ.Oid
113−typeOid = typoid . typ . typeinfo
113+typeOid Field{..} = unsafePerformIO (PQ.ftype result column)
114
114
115data Connection = Connection {
115data Connection = Connection {
116 connectionHandle :: {-# UNPACK #-} !(MVar PQ.Connection)
116 connectionHandle :: {-# UNPACK #-} !(MVar PQ.Connection)