Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

load problem (shape file to postgres)

Hello ,
when I try to load a shape file into a potgis DB , this notification appear and I can't understand it .

L'élément du batch 0 INSERT INTO "public"."metadata" ("the_geom","ZID","NAME","ELEV","ICON") VALUES (GeomFromText('POINT (1.43753035191483 43.5925304098064)', 4326),0,'kml_1',0.0,81) a été annulé. Appeler getNextException pour en connaître la cause.

Labels (2)
5 Replies
Anonymous
Not applicable
Author

Hi, I can't reproduce the issue. Which version of PostGIS are you using ?
Could you also test a simple job with sGeomTxtInput > tPostgresqlOutput and see if you get the same error ?
Thanks.
Francois
Anonymous
Not applicable
Author

I'm trying to execute this simple job you proposed (sGeomTxtInput > tPostgresqlOutput), but i have the same problem, maybe due to the function "geomfromtext" which should have a prefix "ST_" and the single quotes on "POINT(1 2)".
I'm using Talend DI 5.2.2 and TOS Spatial 5.2.1 on postgresql v 9.2.
Have someone fixed this issue?
Thanks
Anonymous
Not applicable
Author

After googoling a lot i found the solution.
The problem is related to the version of postgis. In version 2.0 the geomfromtext function has been deprecated and replaced with the suffix "ST_", as well as all the geometry functions.
Then is enough to run the legacy.sql script (located in: C:\ProgramFiles\PostgreSQL\9.2\share\contrib\postgis-2.0) and it work immediately without the need to restart both postgres or TOS.
Bye
Nico
PLEASE SET THE TOPIC AS SOLVED
Anonymous
Not applicable
Author

Hi NKO,

I have a similar issue,
Can you please send me the legacy.sql script ?
Thanks,
Stefan
Anonymous
Not applicable
Author

Hi, you can simply find it in your installation directory of Postgis within the PostgreSQL X.X folder.
C: ........ PostgreSQL\9.2\share\contrib\postgis-2.0