I have the following function:
CREATE
FUNCTION public.auto_incremento() RETURNS trigger AS '
begin
new.id = (select (max(id) + 1) from teste);
return new;
end;' LANGUAGE 'plpgsql' I created a trigger that uses this function, but i want to the function be usefull for all tables and not only to tbale teste.
Someone know how ???
Pedro Igor