thanks for the help guys, i've solved the problem using PL/PgSQL. once i had "created" the language it was really rather simple.
thanks again -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general