[postgis-users] Segmentation fault error caused by shp2pgsql
Carlos Ho Shih Ning
cning at atech.br
Fri Nov 28 11:51:50 PST 2003
Hi,
I am trying to use the shp2pgsql tool but I am getting the error below.
....
]$ shp2pgsql brazil.shp brazil test > loadbrazil.sql
Segmentation fault
....
I did the following sequence of actions:
- created a table with a script ( ]$ psql -d test -f createtable.sql )
- entered in psql session (psql -d test)
- executed ( SELECT AddGeometryColumn('test', 'brazil', 'the_geom', -1, 'GEOMETRY', 2); )
- finally ( shp2pgsql brazil.shp brazil test > loadbrazil.sql )
The input file is a shape file called "brazil.shp" (Removing the ".shp" extension yields the same error message)
The database is called "test".
The table to be loaded is "brazil"
The sql file expected from the load process is "loadbrazil.sql"
\d produces
Welcome to psql 7.3.4, the PostgreSQL interactive terminal.
test=> \d
List of relations
Schema | Name | Type | Owner
--------+------------------+-------+----------
public | brazil | table | cning
public | geometry_columns | table | postgres
public | spatial_ref_sys | table | postgres
(3 rows)
test=> \d brazil
Table "public.brazil"
Column | Type | Modifiers
------------+-----------------------+-----------
fips_admin | character varying(50) |
gmi_admin | character varying(50) |
admin_name | character varying(50) |
fips_cntry | character varying(50) |
cntry_name | character varying(50) |
region | character varying(50) |
continent | character varying(50) |
pop_admin | character varying(50) |
sqkm_admin | character varying(50) |
sqmi_admin | character varying(50) |
type_eng | character varying(50) |
type_loc | character varying(50) |
the_geom | geometry |
Check constraints: "$1" (srid(the_geom) = -1)
test=> grant all on brazil to group db_test_admin; (I am included in here)
GRANT
==============================
One hint is that (pop_admin, sqkm_admin, sqmi_admin) are numbers.
Did I miss anything?
Any any tip is welcome.
Thank you in advance.
Carlos
More information about the postgis-users
mailing list