database format to posgres