[postgis-users] Violation of Check-Constraint »enforce_srid_punkte«

Mike Toews mwtoews at gmail.com
Thu Oct 7 07:51:41 PDT 2010


On 7 October 2010 02:03, Jan Saalbach <fire at dubmosphere.de> wrote:
> When I create the GeometryColumn with a real SRID instead and then try to
> fill it with points, I get a violation error saying the "Check-Constraint
> »enforce_srid_punkte«" is violated.

You need to also use ST_SetSRID(geom, srid) to give your point the
same SRID as the column definition. So ...

INSERT INTO table (example) VALUES
(ST_SetSRID(ST_makePoint(3441695.00,5975520.00,-7.56), 31467))

-Mike



More information about the postgis-users mailing list