git.iko.soy/typeable/postgresql-simple
on master help sign in
document `tableColumn` behavior on non-table columns

Text taken from upstream libpq docs; this behavior is documented since libpq-8.0.

commitae72d0a38b2fd1734d6229f62cdfad85e9d02e6d authorDaniel Bergey <bergey@teallabs.org> dateTue 2 Jul 2019, 09:30 (7 years ago) parentd0fcf28
1 file changed+5−3
src/Database/PostgreSQL/Simple/FromField.hs+5−3
src/Database/PostgreSQL/Simple/FromField.hs+5−3
@@ -244,9 +244,11 @@ tableOid Field{..} = toMaybeOid (unsafeDupablePerformIO (PQ.ftable result column
244244 then Nothing
245245 else Just x
246246
247−-- | If the column has a table associated with it, this returns the number
248−-- off the associated table column. Numbering starts from 0. Analogous
249−-- to libpq's @PQftablecol@.
247+-- | If the column has a table associated with it, this returns the
248+-- number of the associated table column. Table columns have
249+-- nonzero numbers. Zero is returned if the specified column is not
250+-- a simple reference to a table column, or when using pre-3.0
251+-- protocol. Analogous to libpq's @PQftablecol@.
250252
251253tableColumn :: Field -> Int
252254tableColumn Field{..} = fromCol (unsafeDupablePerformIO (PQ.ftablecol result column))