Trigger to update records out of memory
От | Robert Fitzpatrick |
---|---|
Тема | Trigger to update records out of memory |
Дата | |
Msg-id | 1087579054.2735.12.camel@columbus обсуждение исходный текст |
Ответы |
Re: Trigger to update records out of memory
|
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: