<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body 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
cite="mid:BANLkTi=4=s5h0UHvtNLshp_08zRF_FkdhA@mail.gmail.com"
type="cite">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="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>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Gvsig_internacional mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a>
<a class="moz-txt-link-freetext" href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a>
</pre>
</blockquote>
<br>
</body>
</html>