I think decode('your string', 'escape') might be what you need.
It returns bytea when 'your string' is type text or varchar.
TJ
http://www.gnova.com
> Is there a function that will do what I want to convert the datatype
> without having to create a CAST that PostgreSQL doesn't have natively?
> How else are you supposed to use the ENCRYPT and DECRYPT functions?