@@ -84,12 +84,17 @@ name :: Field -> Maybe ByteString
84name Field{..} = unsafePerformIO (PQ.fname result column)
84name Field{..} = unsafePerformIO (PQ.fname result column)
86-- | Returns the name of the object id of the @table@ associated with the
86-- | Returns the name of the object id of the @table@ associated with the
87−-- column, if any. Returns 'invalidOid' when there is no such table;
87+-- column, if any. Returns 'Nothing' when there is no such table;
88-- for example a computed column does not have a table associated with it.
88-- for example a computed column does not have a table associated with it.
89-- Analogous to libpq's @PQftable@.
89-- Analogous to libpq's @PQftable@.
91−tableOid :: Field -> PQ.Oid
91+tableOid :: Field -> Maybe PQ.Oid
92−tableOid Field{..} = unsafePerformIO (PQ.ftable result column)
92+tableOid Field{..} = toMaybeOid (unsafePerformIO (PQ.ftable result column))
95+ = if x == PQ.invalidOid
94-- | If the column has a table associated with it, this returns the number
99-- | If the column has a table associated with it, this returns the number
95-- of the associated table column. Numbering starts from 0. Analogous
100-- of the associated table column. Numbering starts from 0. Analogous