> If I send something like 25 / '5' I get the result, 5 > but if I send 25 / '0' I get null (division_by_zero) > or when I send 25 / 'textcrap' I get null too.... You might want to look at pl/pgsql exception handlers: http://www.postgresql.org/docs/8.1/static/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING Trapping division by zero is given as an example there... Bye, Chris. -- Chris Mair http://www.1006.org