Fix postgres api implementation
Merge pull request #2 from nberger/fix-postgres-api-impl

Fix postgres api implementation