postgres: convert 4d geometries to 2d (fixes #9748)