I have code which works on columns of arbitrary types, using column_info to extract the column type. I would like to more easily support the Postgres specific types, but while my code is based around the constants returned by the :pg_types export tag, the type returned by column_info in the pg_type field is a string name, rather than the enumerated integers provided by :pg_types.
Would it be possible for column_info to return an additional field which returns the PG_XXX constants, or provide a function which maps the string onto those constants?
Thanks,
Diab
I have code which works on columns of arbitrary types, using
column_infoto extract the column type. I would like to more easily support the Postgres specific types, but while my code is based around the constants returned by the:pg_typesexport tag, the type returned bycolumn_infoin thepg_typefield is a string name, rather than the enumerated integers provided by:pg_types.Would it be possible for
column_infoto return an additional field which returns thePG_XXXconstants, or provide a function which maps the string onto those constants?Thanks,
Diab