Fix issue with Postgres databases

Contribution: Guna Alexander S. dos Santos