postgres provider: convert M to Z geometries (fixes #9032)