1

I have the following statement that I need to run on a table which has a geometry column. I am getting a WKT from Oracle using my C# program and then attempting to insert it into PostgreSQL using an npgsql connection.

highways=# INSERT INTO cluster_125m (CELL_GEOM) 
VALUES(ST_GeomFromWKT('POLYGON ((80000.0 17280.0, 80125.0 17280.0, 80125.0 17405.0, 80000.0 17405.0, 80000.0 17280.0))'));

I get the following error:

ERROR:  function st_geomfromwkt(unknown) does not exist
LINE 1: INSERT INTO cluster_125m (CELL_GEOM) VALUES(ST_GeomFromWKT('...
                                                ^
HINT:  No function matches the given name and argument types. You might need to
add explicit type casts.

What is the issue here and what can be done about it?

GEOCHET
  • 21,119
  • 15
  • 74
  • 98
CSharpened
  • 11,674
  • 14
  • 52
  • 86

1 Answers1

5

Use function ST_GeomFromText instead of ST_GeomFromWKT.

Brad Koch
  • 19,267
  • 19
  • 110
  • 137
Ben
  • 4,392
  • 3
  • 23
  • 20