Fix the postgresql check