try to support postgres and try to fix the tests
added an test to improve coverage