[postgis-users] Problem with new datatypes

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Fri Dec 15 02:08:23 PST 2006


On Fri, 2006-12-15 at 10:18 +0100, "Ing. Aleš Daněk" wrote:
> Hi!
> 
> I tested new datatypes and I could only save this type to Geometry type 
> column. When I tried save it to for example CIRCULARSTRING postgis wrote 
> this error :
> new row for relation "curve_test" violates check constraint 
> "enforce_geotype_the_geom_c"
> 
> I was using this SQL commands:
> select addgeometrycolumn('','table','column',-1,'CIRCULARSTRING',2);
> update curve_test set the_geom_c=GeomFromEWKT( 'CIRCULARSTRING(18 49,17 
> 47,20 51)' );
> 
> Is it because SQL/00 standard isn't fully supported or I'm doing some 
> mistake?
> 
> Best regard
> 
> Aleš


Hi Aleš,

Well the default SRID on a new geometry should be -1, so I can't see why
there is a problem with the constraint. What happens if you set the SRID
explicitly, e.g. :

update curve_test set the_geom_c=setSRID(GeomFromEWKT('CIRCULARSTRING(18
49,17 47,20 51)'), -1);


Kind regards,

Mark.





More information about the postgis-users mailing list