<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>FDOPostgis3.4L Problem Field type serial</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">Dear List,</FONT></SPAN>
</P>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">BEGIN;</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">CREATE TABLE &quot;blocktest8&quot; (&quot;gid&quot; int4 PRIMARY KEY,</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">&quot;uid&quot; serial,</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">&quot;blockname&quot; varchar(255),</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">&quot;layer&quot; varchar(255),</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">&quot;rotation&quot; numeric,</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">&quot;s&quot; varchar(255),</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">&quot;u&quot; varchar(255));</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">SELECT AddGeometryColumn('','blocktest8','the_geom','-1','POINT',2);</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">INSERT INTO &quot;blocktest8&quot; (&quot;gid&quot;,&quot;blockname&quot;,&quot;layer&quot;,&quot;rotation&quot;,&quot;s&quot;,&quot;u&quot;,the_geom) VALUES (1,'GN1','GN',0,'789',NULL,'0101000000FDA08A2C9FB3E3C0B9770762A8FA0E41');</FONT></SPAN></P>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">INSERT INTO &quot;blocktest8&quot; (&quot;gid&quot;,&quot;blockname&quot;,&quot;layer&quot;,&quot;rotation&quot;,&quot;s&quot;,&quot;u&quot;,the_geom) VALUES (2,'GN2','GN',0,'2345','6','0101000000E54B15C275B3E3C053379F6D81F90E41');</FONT></SPAN></P>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">END;</FONT></SPAN>
</P>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">If I create a new a new Point feature in the fdo-connected layer</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">the system proposes a value 0. This value is inserted in the &quot;uid&quot; with check-in.</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">I can edit the value of &quot;uid&quot; for instance to a numbervalue like 7. Then this number is inserted with check-in.</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">There is no autoincrement. If &quot;uid&quot; is set with constraint Primary Key and serial the check-in of a new Point feature</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">causes an error message although the uid is inserted and autoincremented in PostGIS.</FONT></SPAN>
</P>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">if after check-in check-out is canceled and the layer is refreshed the insert is visible in the data-table</FONT></SPAN>
</P>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">in acad_fdopostgis.log:</FONT></SPAN>
</P>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">19:01:18:847 (0x00000850) :&nbsp; &gt;&gt;[Connection::+PgExecuteCommand]</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">19:01:18:847 (0x00000850) :&nbsp;&nbsp; SQL:</FONT></SPAN>

<BR><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">INSERT INTO &quot;public&quot;.&quot;blocktest8&quot; (the_geom,gid,uid,blockname,layer,rotation,s,u) VALUES ('01010000009D08E26E38B6E3C0C58D6B4032FB0E41',3,0,'GN1','GN',0,'4764','3')</FONT></SPAN></P>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">19:01:18:847 (0x00000850) :&nbsp;&nbsp; Affected tuples: 1</FONT></SPAN>
</P>
<BR>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">postgres-2009-08-05_143532.log:</FONT></SPAN>
</P>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">2009-08-05 19:01:18 LOG:&nbsp; duration: 0.000 ms&nbsp; statement: INSERT INTO &quot;public&quot;.&quot;blocktest8&quot; (the_geom,gid,uid,blockname,layer,rotation,s,u) VALUES ('01010000009D08E26E38B6E3C0C58D6B4032FB0E41',3,0,'GN1','GN',0,'4764','3')</FONT></SPAN></P>
<BR>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">uid Data type: integer; Default value: nextval('blocktest8_uid_seq'::regclass)</FONT></SPAN>
</P>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">CREATE SEQUENCE blocktest8_uid_seq</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">&nbsp; INCREMENT 1</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">&nbsp; MINVALUE 1</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">&nbsp; MAXVALUE 9223372036854775807</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">&nbsp; START 2</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">&nbsp; CACHE 1;</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">ALTER TABLE blocktest8_uid_seq OWNER TO postgres;</FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">GRANT ALL ON TABLE blocktest8_uid_seq TO postgres;</FONT></SPAN>
</P>
<BR>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">any idea what is wrong ?</FONT></SPAN>
</P>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">Karl</FONT></SPAN>
</P>
<BR>

<P><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></SPAN><SPAN LANG="de"> </SPAN>
</P>

</BODY>
</HTML>