refactor, unit test for type mapping (POSTGRESQL9)