Hello
I solved the problem...
I had another function that had the asme problem, after the trigger
execution no record was editable in Ms Access and the new record could be
edited in qgis/pgadmin but qgis couldn't delete it
I solved the block with quotation of these rows
--NEW.utente_inser = (select current_user);
--NEW.data_inser = (select now());
The functin now works and is like the above:
CREATE OR REPLACE FUNCTION myschema.myfunction()
RETURNS trigger AS
$BODY$
BEGIN
NEW.field1 = (SELECT ... from .... where NEW.geom&&b.geom and
st_contains(b.geom, NEW.geom));
NEW.field2 = (SELECT ... FROM ... where NEW.geom&&b.geom and
st_contains(b.geom, NEW.geom));
NEW.field3 = (SELECT ... FROM where NEW.geom&&b.geom and
st_contains(b.geom, NEW.geom));
--NEW.utente_inser = (select current_user);
--NEW.data_inser = (select now());
RETURN NEW;
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
ALTER FUNCTION myschema.myfunction()
OWNER TO myself;
What coul be the problem???
Thanks everybody
Pietro
--
View this message in context:
http://postgis.17.x6.nabble.com/unable-to-modify-records-after-trigger-execution-tp5007158p5007294.html
Sent from the PostGIS - User mailing list archive at Nabble.com.
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users