[Gvsig_english] problems saving a Postgis layer edits with gid PK

G. Allegri giohappy at gmail.com
Thu Jun 30 14:56:22 CEST 2011


Mmm, I didn't know gvSIG expected the PK to be autoincremental. This model
changes from software to software.
Thanks,
Giovanni

2011/6/30 Falk Krusche <krusche at mapconcept.de>

> **
> Hello Giovanni,
>
> actually a postgis table needs an integer primary key field with sequence
> to autoincrement the id value:
>
> create table dummy(
>    id int serial primary key,
>    ...
> );
>
>
> Falk
>
> Am 30.06.2011 14:43, schrieb G. Allegri:
>
> Hi all,
> I'm testing some gvSIG 1.11. features on Postgis layers. I have a
> Linestraing layer with a single GID column (and a geom, obviously), which is
> a not-nullable integer field and the PK of the table.
> When I insert a new linestring, I also open the attributes table and insert
> the GID value manually, then I save the layer. The resulting SQL call to
> Postgis tries to insert the geometry, but doesn't include the GID field
> value, so I get a not-null constraint violation error from PG.
> Am I doing something wrong?
> I'm following the debug step by step, but I loose myself within the
> "expansion" file mechanis, used by gvSIG to track the edits (I will ask on
> this in another thread on the dev ml).
>
> thanks,
> giovanni
>
>
> _______________________________________________
> Gvsig_internacional mailing listGvsig_internacional at listserv.gva.eshttp://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>
>
>
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at listserv.gva.es
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.gva.es/pipermail/gvsig_internacional/attachments/20110630/52523126/attachment.htm 


More information about the Gvsig_internacional mailing list