I know I need to think a different approach of what execute blocks does on Firebird. What I was trying to was just let them the way they were wrote, because their results are correct and with more time replace them to a new way. But, if that way cannot be used, I´ll probably write some hundred of functions right now and use them, because this way works for sure. And then, with more time to spend, I´ll replace them one by one. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html