On 11/09/2012 14:24, Alexander Reichstadt wrote: > > > What am I doing wrong? > What version of PG are you using? The default output format of bytea changed from "escape" to "hex" a version or two ago - try changing it to "escape" and see if that makes a difference: ALTER DATABASE xxxxx SET bytea_output='escape'; BTW, it's a REALLY bad idea to build literal SQL queries from input values, as you're doing - you should use parameters and pg_query_params() instead. Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@xxxxxx -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general