[postgis-users] (no subject)

Chrystel Losier chrystel.losier at reseauzec.com
Wed Oct 29 12:44:52 PDT 2014


Sorry...I figured out the problem...I had manually entered one line of data
into the table in PostGIS so the pkey 1 already existed, by deleting this
row there was no problem appending

2014-10-29 15:41 GMT-04:00 Chrystel Losier <chrystel.losier at reseauzec.com>:

> I am fairly new to PostGIS and need to append data from a shp to an
> already existing table in PostGIS. All the columns from the shp and the
> table are the same, except that the shp does not already contain the
> geometry column and the primary key column. I am using the following
> command line to append the data :
>
>
>
> "C:\Program Files\PostgreSQL\9.3\bin\shp2pgsql.exe"  -g the_geom -W latin1
> -s 900913 -a peche_gue_final_projeter.shp corpo.peche_gue  | "C:\Program
> Files\PostgreSQL\9.3\bin\psql.exe" -h demo.spatialytics.com -d zec_quebec
> -U jlabelle –q
>
>
>
> I get the following error message :
>
>
>
> Error : duplicate key value violates unique constraint « peche_gue_pkey »
>
> Details : Key « id_p_gue » = « 1 » already exists.
>
>
>
> The table in PostGIS to which I want to append data already has a primary
> key column : . « id_p_gue » which is in serial.
>
>
>
> Any ideas how to deal with this problem?
>
>
>
> Thanks!
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20141029/615434e5/attachment.html>


More information about the postgis-users mailing list