title: PostgreSQL 9.X bytea representation in 'hex' or 'escape' for thumbnail images
body: <p>My application (developed in Delphi and ZEOS components) uses PostgreSQL 8.4 and stores some thumbnail images into a <code>bytea</code> column.</p>
  
  <p>I want to migrate to PostgreSQL 9.2 and have restored the dump and everything works fine except when I try to retrieve those images: Postgres 9.2 uses <code>hex</code> for output representation instead of <code>escape</code> used in Postgres 8.4.</p>
  
  <p>There are two possible solutions: Change the Postgres 9.2 settings for <code>escape</code> representation or change the <code>hex</code> string in binary data via application. But what is the best solution? Why did PostgreSQL 9.X change to <code>hex</code> for <code>bytea</code> representation?<br>
  It is a simple setup or are there technical reasons?</p>