refactored database-get-type-specifier for postgres and mssql