Hi there.
I'm trying to use triggers for the first time, but I'm having some
problems.
Here's my SQL:
create function set_counter()
returns opaque
as 'BEGIN
new.count := 0;
RETURN new;
END;'
language 'plpgsql';
create trigger set_counter after insert or update on nivel
for each row execute procedure set_counter();
count is an int, and its default value is -1.
The problem is that after I insert something, count value is still -1,
not 0!
Could someone tell me what's wrong?
Thanks
--
Nelio Alves Pereira Filho
IFX Networks
Sao Paulo / Brazil