[fdo-users] FDOPostgis3.4L Problem Field type serial

Hermann Karl Karl.Hermann at dornbirn.at
Wed Aug 5 13:25:21 EDT 2009


Dear List,

BEGIN;
CREATE TABLE "blocktest8" ("gid" int4 PRIMARY KEY,
"uid" serial,
"blockname" varchar(255),
"layer" varchar(255),
"rotation" numeric,
"s" varchar(255),
"u" varchar(255));
SELECT AddGeometryColumn('','blocktest8','the_geom','-1','POINT',2);
INSERT INTO "blocktest8"
("gid","blockname","layer","rotation","s","u",the_geom) VALUES
(1,'GN1','GN',0,'789',NULL,'0101000000FDA08A2C9FB3E3C0B9770762A8FA0E41')
;
INSERT INTO "blocktest8"
("gid","blockname","layer","rotation","s","u",the_geom) VALUES
(2,'GN2','GN',0,'2345','6','0101000000E54B15C275B3E3C053379F6D81F90E41')
;
END;

If I create a new a new Point feature in the fdo-connected layer
the system proposes a value 0. This value is inserted in the "uid" with
check-in.
I can edit the value of "uid" for instance to a numbervalue like 7. Then
this number is inserted with check-in.
There is no autoincrement. If "uid" is set with constraint Primary Key
and serial the check-in of a new Point feature
causes an error message although the uid is inserted and autoincremented
in PostGIS.

if after check-in check-out is canceled and the layer is refreshed the
insert is visible in the data-table

in acad_fdopostgis.log:

19:01:18:847 (0x00000850) :  >>[Connection::+PgExecuteCommand]
19:01:18:847 (0x00000850) :   SQL:
	INSERT INTO "public"."blocktest8"
(the_geom,gid,uid,blockname,layer,rotation,s,u) VALUES
('01010000009D08E26E38B6E3C0C58D6B4032FB0E41',3,0,'GN1','GN',0,'4764','3
')
19:01:18:847 (0x00000850) :   Affected tuples: 1


postgres-2009-08-05_143532.log:

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
')


uid Data type: integer; Default value:
nextval('blocktest8_uid_seq'::regclass)

CREATE SEQUENCE blocktest8_uid_seq
  INCREMENT 1
  MINVALUE 1
  MAXVALUE 9223372036854775807
  START 2
  CACHE 1;
ALTER TABLE blocktest8_uid_seq OWNER TO postgres;
GRANT ALL ON TABLE blocktest8_uid_seq TO postgres;


any idea what is wrong ?

Karl


  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-users/attachments/20090805/6cb31bf5/attachment.html


More information about the fdo-users mailing list