All type conversion to and from the PostgreSQL server is handled here.
TemplatePG currenly only supports a handful of types. It also doesn't distinguish between numeric types with different ranges. More types are the most likely feature of future TemplatePG releases.
timestamptz (timestamp with time zone)
date (day without time)
interval (a time interval), send-only
Convert a type OID from PostgreSQL's catalog to a TemplatePG
representation. To get a list of types:
SELECT typname, oid FROM pg_type
Note that I have assumed, but not tested, that type OIDs for these basic
types are consistent across installations. If not, I'm going to have to
switch to using the text descriptions
Convert a string from PostgreSQL of the given type into an appropriate
Haskell value. Or, more accurately, given a PostgreSQL type, create a
function for converting a string of that type into a compatible Haskell
pgStringToType :: PGType -> (String -> ?)