I am using postgresql 9.4.1 and postgis 2.1(pg 94) and also qgis 2.4.0. All the installation went well. But, when I tried to import shapefile to postgis via postgis shp & dbf loader it couldn't work! Here is the warning message:


Importing with configuration: area, public, geom, D:\temp\area.shp, mode=c, dump=1, simple=0, geography=0, index=1, shape=1, srid=0 Shapefile type: Arc PostGIS type: MULTILINESTRING[2] Failed SQL begins: "SET CLIENT_ENCODING TO UTF8; SET STANDARD_CONFORMING_STRINGS TO ON; BEGIN; CREATE TABLE "public"."area" (gid serial, "objectid" int4, "fid_block3" int4, "shape_leng" numeric); ALTER TABLE "public"."area" ADD PRIMARY KEY (gid); SELECT AddGeometryColumn('pu" Failed in pgui_exec(): ERROR: fungsi addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) tidak ada LINE 9: SELECT AddGeometryColumn('public','area','geom','0','MULTILI... ^

HINT: Tidak ada fungsi yang sesuai dengan nama dan tipe argumen yang diberikan.Anda mungkin perlu menambakan cast tipe eksplisit

Shapefile import failed.


At first I thought it was because of my shapefile is broken. But it was not. I try to produce new shapefile and still couldn't import! If anyone ever found the same case, please share your solution to me.

Oh ya, in addition, I also have tried the SPIT tools in qgis and still I can't import the shapefile with warning massage:

Problem inserting features from file: D:/temp/for_postgres/poligon.shp

Error while executing the SQL:

SELECT f_table_name FROM geometry_columns WHERE f_table_name='poligon' AND f_table_schema='public'

The database said:ERROR: relasi « geometry_columns » sudah ada LINE 1: SELECT f_table_name FROM geometry_columns WHERE f_table_name...^

  • 1
    Sorry, but I can't really understand the hint. Apr 27 '15 at 7:29
  • 1
    Hi Micky, the hint said this in english : There is no function that matches the name and type of arguments given. You may need to add explicit type cast. << Thats it. Hope you could give me suggestion. Thanks. Apr 27 '15 at 7:33
  • Seems there is something wrong in you shapefile definition or in the syntax used to load it. could you try with "shp2pgsql-gui" interface? Apr 27 '15 at 7:52
  • Hi Micky, thank you for your suggestion. Ya, I've just tried "shp2pgsql-gui" interface but the warning message appear again with the same comment. I will try to unistall the postgis and reinstall. Maybe it can solve the problem. Apr 27 '15 at 8:00
  • Yes, it's a good idea. take a look at this. Apr 27 '15 at 8:19

I think that you have to configure postGIS library as extension in your database. Here an example.

  • Hi Micky, thank you in advance for your help. Yes I've tried to enable the extension by your tutorial. It works! I do not have problem to import shapefile now. Many thanks :) Apr 27 '15 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.