Add some robustness in the postgresql department.

no issue #