[postgis-users] shp2pgsql not loading in 0.8.2

strk strk at keybit.net
Thu Jan 15 02:02:30 PST 2004


carrolls wrote:
> Hi,
> 
> I have been playing with postgis 0.8.2 and it now gives me an error when 
> running shp2pgsql when 0.8.1 did not.  I am trying to load dmti spatial 
> data on the BC road network.  I have provided outputs comparing the two 
> versions below.
> 
> carrolls at ict715b:> /scratch/postgresql-7.4/contrib/postgis-0.8.0/loader/shp2pgsql 
> /home/vraid2/carrolls/dmti/AB_BC_MB_SK/ArcView/Nad83/CanMapRL/BC/Streets/BCrte.shp 
> BCrte noschema > toload.sql
> carrolls at ict715b:> /scratch/postgresql-7.4/contrib/postgis-0.8.1/loader/shp2pgsql 
> /home/vraid2/carrolls/dmti/AB_BC_MB_SK/ArcView/Nad83/CanMapRL/BC/Streets/BCrte.shp 
> BCrte > toload.sql
> Error: field 20 has invalid or unknown field type (3)

Type 3 is a Logical type in dbf. I don't think it was supported before.
Are you ure it did actually work with previous shp2pgsql versions ?

> 
> I noticed that AddGeometryColumn now allows for schemas which is great but 
> shp2pgsql.c v1.45 0.8.2 does not appears to allow for schemas.  Am I 
> missing a simple way of loading shape files into specific schemas other 
> than editing the created sql statements?  Could an extra arguement be 
> added to shp2pgsql for the schema and if one is not given 
> default to the public schema?

The simplest way is sourcing shp2pgsql output after having set your
search_path starting with the schema you want the geometry tables 
to be created. AddGeometryColumn will use current_schema() which 
in turn will return the first schema in the comma-separated list
in search_path.

--strk;
> 
> Seamus
> 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list