Toni Garcia ([EMAIL PROTECTED]) reports a bug with a severity of 2 The lower the number the more severe it is.
Short Description LASTOID in 7.2.1 with INSERT RULES ON VIEWS Long Description This fix on 7.2.1 has apparently changed the OID that is returned with ON INSERT rules: - Return proper OID on command completion even with ON INSERT rules (Tom) The 7.2.1 behaivour (returning the OID generated by the first command) is good for rules ON INSERT on tables with no DO INSTEAD command but i think it makes no sense for view rules or DO INSTEAD rules where there is no OID for the first command. Sample Code CREATE table myobject ( name varchar(32) PRIMARY KEY, aproperty varchar(32), anotherproperty varchar(32) ); CREATE table myimage ( name varchar(32) PRIMARY KEY, image oid, CONSTRAINT FK_obj_ima_1 FOREIGN KEY (name) REFERENCES myobject(name) ON UPDATE CASCADE ON DELETE CASCADE ); CREATE VIEW myimage_obj AS select i.oid, i.*, o.aproperty, o.anotherproperty from myimage i, myobject o where i.name = o.name; CREATE RULE myimage_ins AS ON INSERT TO myimage_obj DO INSTEAD ( INSERT into myobject (name, aproperty, anotherproperty) values (NEW.name, NEW.aproperty, NEW.anotherproperty); INSERT into myimage (name, image) values (NEW.name, NEW.image); ); ---- this used to return myimage's oid (last inserted oid) on 7.2.0: =# INSERT INTO myimage_obj (name, aproperty) values ('mygif', 'verybig'); INSERT 0 0 No file was uploaded with this report ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster