Closed maym86 closed 5 years ago
Try removing the ST_
as we work with binary data here instead of strings. The function ST_GeomFromEWKT exists, just only with a string parameter, instead of the unknown
which in this case is the raw data.
pos := postgis.PointZ{lon, lat, height}
cmd = `INSERT INTO ` + estimatesTable + ` (id, ts, pos, type, lat_s, lon_s, height_s, track_id) VALUES ($1, to_timestamp($2::double precision / 1000), GeomFromEWKT($3), $4, $5, $6, $7, $8);`
res, err = signEstimateService.postgresSession.Exec(cmd, deviceID, ts, pos, signType, latSigma, lonSigma, heightSigma, trackingID)
When I try the following code I get an error:
This works when I do it directly using sql as follows:
Am I doing something wrong or is the function somehow not supported by pq?