gwchamb@xxxxxxxxx wrote: > Vincent... > >> This would be a problem related to php, not postgres. I'm handling binary data >> in parameterized and COPY queries just fine with c++. > > I'm not ruling-out PHP, but I've seen claims of pg_[un]escape_bytea > being only wrappers to the Pg functions. That is correct, the PHP function relies on the PostgreSQL library to do the work. But the problem of using a parameterized query with bytea data is specific to PHP. PostgreSQL allows you to either escape the bytea data for use as a text-mode parameter, or pass it 'raw' as a binary-mode parameter. I don't know a good way to do the first in PHP, and the PHP PostgreSQL interface doesn't support the second at all.