GIVEN: gisTable (Table) has a geom (geometry) column defined as follows:
ALTER table gisTable ADD column geom geometry (Multipolygon, 4326);
I am attempting to run the UPDATE command below which is part of a function I am attempting to debug. The UPDATE command is as follows. my function not shown takes 7 arguments from a vb application (the table name, a primary id , an alternate id and two coordinate pairs (lon/lat) which form the GIS polygon to be inserted.
UPDATE thisSchema.gisTable SET geom=st_asbinary(st_geomfromtext('POLYGON((37.98 7.51, 38.51 7.51, 38.51 6.98, 37.98 6.98, 37.98 7.51))', 4326)) WHERE mainid = '023456' AND altId = 'ABC';
When I execute the command above the error states that the SRID is not found or is SRID(0); however I am setting it in the st_geomfromtext portion of this clause.
Questions: Can I use POLYGON even though the geom column was defined as Multipolygon (above) When I modify POLYGON to MULTIPOLYGON I get a parse error after the first coordinate.
Should the POLYGON clause be wrapped in two (( and )) as shown above.
I have the following function I am using to update each row in gis_table' geom column;