You can do it one of three ways. One is to store it as a Large Object, which was implemented way back when postgresql had an 8k row limit to work around. Since 7.1 or so came out, Postgresql has had about a 1 gig field size limit.
Now, the preferred method is to either encode it to base-64 or uuencode, and store it in a text field, or to use pg_escape_bytea function to escape the data and store it in a bytea field.