ThinkGeo.com    |     Documentation    |     Premium Support

PostgreSqlFeatureSource crashes when inserting with WhereClause

When I have a PostgreSqlFeatureLayer with a WhereClause set and try to insert a feature, the CommitTransaction call fails.

The server log shows that the WHERE clause was appended to the INSERT statement, e.g.:

ERROR:  syntax error at or near "WHERE" at character 103
STATEMENT:  insert into "myschema"."mm_tr_lm_stations" ("GEOLOC","MI_STYLE") values(ST_GeomFromWKB($1,28992),$2)  WHERE "TRSTATUS" = 0

Hey @Clemens_Ladisch,

Good catch. That’s not supposed to happen. I’ve pushed up a fix into our develop branch and should be available in NuGet for the following packages later today:

  • ThinkGeo.Core v13.0.0-beta275
  • ThinkGeo.PostgreSql v13.0.0-beta265

Thanks,
Kyle