Fixed postgresql support