ok, i think that i will try to use pl/perl or pl/python but i don't know which one is better for my problem
Whichever you know better is the best solution.
-- Richard Huxton Archonet Ltd
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq