Dear All,
when trying to insert a polygon into a table from a plperl script by this command:

my $new_poly = spi_exec_query("INSERT INTO polys1(id,poly) VALUES($new_id, ST_MakeEnvelope($xmin, $ymin , $xmax, $ymax, 31467));");

I get a

"new row for relation »polys1« violates Check-Constraint »enforce_geotype_poly«"

What I think it means is that only a POLYGON can be inserted. Now, previously (not from a plperl script) the same INSERT command with MakeEnvelope worked just fine on a table with the exact same structure and properties.

The Column was created using

SELECT AddGeometryColumn('polys1','poly',31467,'POLYGON', 2);

How can I get this INSERT command to work? Any suggestions?

Regards
Jan
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to