Hi list. I've found an issue in PostgisDataStore.java.
The code here: sql.append(" ADD CONSTRAINT enforce_geotype_"); sql.append(columnName); sql.append(" CHECK (geometrytype("); sql.append(sqlb.encodeColumnName(columnName)); sql.append(") = '"); sql.append(typeName); sql.append("'::text OR "); sql.append(sqlb.encodeColumnName(columnName)); Look at typeName: sometimes it returns a bad value: for my case, either "POINTM" or "POINT". The problem is actually for defining "typeName", a call to getGeometrySQLTypeName(Class type); So there is a MAP "GEOM_CLASS_MAPPINGS" that contains type name as String and their class, like: GEOM_TYPE_MAP.put("POINT", Point.class); GEOM_TYPE_MAP.put("POINTM", Point.class); So now, when we call getGeometrySQLTypeName(Class type), which value is returned?? Either "POINT" or "POINTM"... It's not deterministic. For my case "POINT" should be returned and I only got "POINTM". So, would be great considering removing "POINTM" if its not mandatory, or make correct accesses to the MAP to avoid mistakes. Cheers, Rémy
------------------------------------------------------------------------------
_______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel