improved postgresql support