[postgis-users] shp2pgsql, pb with append

strk at refractions.net strk at refractions.net
Fri Dec 10 01:37:09 PST 2004


On Fri, Dec 10, 2004 at 10:29:47AM +0100, "Guillaume SUEUR (Géosignal)" wrote:
> Hi,
> When I use shp2pgsql with -a option to append the records to an existing 
> table, the script doesn't include the id fields in the fields list but 
> it does for the values list. And so the insert is incorrect :
> INSERT INTO "geocomm" ("code","nom","dep",the_geom) VALUES 
> ('1','97209','Fort-de-France','972',GeometryFromText('MULTIPOLYGON(((....
> 
> See : 4 fields and 5 values !
> 
> I'm still using postGIS 0.8, is that fixed in version 0.9 ?

Yes, removing the id from the VALUES, as it should have its own
sequence generating unique ids for appended values.

> 
> Thanks

Thank you
--strk;

> 
> -- 
> ---------------------------
> Guillaume SUEUR
> GEOSIGNAL - Groupe BVA
> 25bis Avenue Marcel Dassault
> 31505 TOULOUSE CEDEX 5
> ----------------------------
> 
> _______________________________________________
> 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