<!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 "blocktest8" ("gid" int4 PRIMARY KEY,</FONT></SPAN>
<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">"uid" serial,</FONT></SPAN>
<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">"blockname" varchar(255),</FONT></SPAN>
<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">"layer" varchar(255),</FONT></SPAN>
<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">"rotation" numeric,</FONT></SPAN>
<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">"s" varchar(255),</FONT></SPAN>
<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">"u" 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 "blocktest8" ("gid","blockname","layer","rotation","s","u",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 "blocktest8" ("gid","blockname","layer","rotation","s","u",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 "uid" with check-in.</FONT></SPAN>
<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">I can edit the value of "uid" 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 "uid" 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) : >>[Connection::+PgExecuteCommand]</FONT></SPAN>
<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial">19:01:18:847 (0x00000850) : SQL:</FONT></SPAN>
<BR><SPAN LANG="de-at"> <FONT SIZE=2 FACE="Arial">INSERT INTO "public"."blocktest8" (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) : 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: duration: 0.000 ms statement: INSERT INTO "public"."blocktest8" (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"> INCREMENT 1</FONT></SPAN>
<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial"> MINVALUE 1</FONT></SPAN>
<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial"> MAXVALUE 9223372036854775807</FONT></SPAN>
<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial"> START 2</FONT></SPAN>
<BR><SPAN LANG="de-at"><FONT SIZE=2 FACE="Arial"> 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"> </FONT></SPAN><SPAN LANG="de"> </SPAN>
</P>
</BODY>
</HTML>