Hi Kimi,
You will need to be using postgres 7.1 or greater - preferably 7.2.1.
You should use the 'bytea' data type.
You will need to escape the data properly when inserting it and when retrieving it. You can use the pg_escape_bytea() function of a recent version of PHP to escape it when saving. Unfortuntely the function to unescape it when retrieving will be in postgres 7.3.
So, you will need to do some investigation of how to unescape it yourself. Check the docs.
Cheers,
Chris