Mmm, I didn't know gvSIG expected the PK to be autoincremental. This model changes from software to software.<br>Thanks,<br>Giovanni<br><br><div class="gmail_quote">2011/6/30 Falk Krusche <span dir="ltr"><<a href="mailto:krusche@mapconcept.de">krusche@mapconcept.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><u></u>
<div bgcolor="#ffffff" text="#000000">
Hello Giovanni,<br>
<br>
actually a postgis table needs an integer primary key field with
sequence to autoincrement the id value:<br>
<br>
create table dummy(<br>
id int serial primary key,<br>
...<br>
);<br>
<br>
<br>
Falk<br>
<br>
Am 30.06.2011 14:43, schrieb G. Allegri:
<blockquote type="cite"><div><div></div><div class="h5">Hi all,<br>
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.<br>
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.<br>
Am I doing something wrong?<br>
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).<br>
<br>
thanks,<br>
giovanni<br>
<div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%">
</div>
</div></div><pre><fieldset></fieldset>
_______________________________________________
Gvsig_internacional mailing list
<a href="mailto:Gvsig_internacional@listserv.gva.es" target="_blank">Gvsig_internacional@listserv.gva.es</a>
<a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a>
</pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
Gvsig_internacional mailing list<br>
<a href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a><br>
<a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
<br></blockquote></div><br><div style="visibility: hidden; left: -5000px; position: absolute; z-index: 9999; padding: 0px; margin-left: 0px; margin-top: 0px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 130%;" id="avg_ls_inline_popup">
</div>