On 7.4.2 I have a trigger that I want to update any existing boolean values to false if a new one in that group is declare true by inserting a new record or updating an existing record:
ohc=# CREATE OR REPLACE FUNCTION "public"."clear_common_groups" () RETURNS trigger AS' ohc'# BEGIN ohc'# IF NEW.common_area = ''t'' THEN ohc'# UPDATE tblhudunits SET common_area = ''f'' WHERE hud_building_id = NEW.hud_building_id; ohc'# END IF; ohc'# IF NEW.exterior_area = ''t'' THEN ohc'# UPDATE tblhudunits SET exterior_area = ''f'' WHERE hud_building_id = NEW.hud_building_id; ohc'# END IF; ohc'# RETURN NULL; ohc'# END; ohc'# 'LANGUAGE 'plpgsql' IMMUTABLE CALLED ON NULL INPUT SECURITY INVOKER; CREATE FUNCTION ohc=# CREATE TRIGGER "new_common_area" BEFORE INSERT OR UPDATE ohc-# ON "public"."tblhudunits" FOR EACH ROW ohc-# EXECUTE PROCEDURE "public"."clear_common_groups"(); CREATE TRIGGER ohc=# update tblhudunits set common_area = 't' where sort_order = 2; ERROR: out of memory DETAIL: Failed on request of size 1048576. Can someone point out what I am obviously doing wrong? -- Robert ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org