pgCheckGeom function

Check if geometry or geography column exists in a table, and return the column name for use in a query.