[GRASSLIST:6760] Re: problems importing shapefile ...

Radim Blazek blazek at itc.it
Thu May 12 03:34:18 EDT 2005


Oliver.Chikumbo at forestresearch.co.nz wrote:
> DBMI-Postgres driver error:
> Cannot execute:
> create table /usr/local/pgsql.wharetrial (cat integer, OBJECTID integer,
> SHAPE_Leng double precision, SHAPE_Area double precision, Paddock_na
> varchar (23), Field_area double precision, Land_use varchar (20),
> Biodiversi varchar (20), Age_class double precision, Slope varchar (20),
> Soils varchar (20))

It seems that "/usr/local/pgsql" is used as schema, are you sure that 
schema is not defined? Try to set/unset schema with db.connect.
I dont see a problem in the library, it is using

db_get_connection:
connection->schemaName = G__getenv2("DB_SCHEMA", G_VAR_MAPSET);

Vect_default_field_info:
schema = connection.schemaName;
if ( schema && strlen(schema) > 0 ) {
     sprintf ( buf2, "%s.%s", schema, buf );
     fi->table = G_store ( buf2 );
} else {

Radim




More information about the grass-user mailing list