Wim,
> I need to write some functions in my PostgresDB...
> Does anyone know a good tutorial on the Internet.
> I need to have some explanation on the use of variables,
> the while-loop and how to implement functions in Postgres...
>
Check out TechDocs:
http://techdocs.postgresql.org/
Particularly, Roberto Mello's improved PL/pgSQL documentation and
function library are useful.
-Josh