Dan,
This may be no help to you but I have openacs-4-6 installed and the 'decode' function is present in postgres (\df at psql command line).
I have been looking for some documentation to tell me what it does but have not yet found any.
Regards
Richard