Hi,
it should be possible to return the type name for a given column. There are no guarantees that the OID for user defined types will be the same from one creation to another (we experienced this in-house for some types)
Ideally there should be another method for the result class that will return the type name. One can use the following SQL statement to retrieve the column types, names, OID, and type names from the system database:
SELECT a.attnum, a.attname, a.atttypid, t.typname
FROM pg_class c, pg_attribute a, pg_type t
WHERE c.relname = '$tablename'
AND a.attnum > 0 AND a.attrelid = c.oid
AND a.atttypid = t.oid ORDER BY a.attnum;
regards,
teodor