Hello *,
I have a litlle problem writing a plpgsql trigger function. I am in need to
get some interpretaion of the TG_OP within an IF clause to decide with action
will be taken. I tried it that way:
IF (TG_OP=DELETE AND check_count > 1) THEN
UPDATE tipp_team
SET team_count = (select count(*) from tipp_team_members
where member_team_id=OLD.member_team_id)
WHERE team_id=OLD.member_team_id;
END IF;
and I got the following error:
tippspiel2003=# delete from tipp_team_members where member_team_id=2 and
member_user_id=27;
WARNING: Error occurred while executing PL/pgSQL function
update_team_member_count
WARNING: line 13 at if
ERROR: Attribute "delete" not found
tippspiel2003=#
What am I making wrong ?
best regards
-Andreas Schmitz
--
Andreas Schmitz - Phone +49 201 8501 318
Cityweb-Technik-Service-Gesellschaft mbH
Friedrichstr. 12 - Fax +49 201 8501 104
45128 Essen - email [EMAIL PROTECTED]
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]