fix issue with postgres databases

Contribution: Guna Alexander S. dos Santos