title: How to store and retrieve PHP serialize() in PostgreSQL?
body: <p>I just converted to PostgreSQL from MySQL. In PostgreSQL my field (<code>jobInfo</code>) is a blob in (<code>bytea</code>) format. </p>
  
  <pre><code>SELECT folderName, jobInfo
  FROM jobs
  </code></pre>
  
  <p>In mySQL, that field came in as a string that could be unserialized. However, when I read the data in from postgres, it comes in looking like this:</p>
  
  <blockquote>
    <p>\x613a31353a7b733a31373a2266696c65466f726d617456657273696f6e223b733a333a22342e30223b733a373a226a6f62
    [.....]</p>
  </blockquote>
  
  <p>Is there a way, in PHP or postgres, to decode that back to the serialized string of text characters?</p>
  
  <p><strong>UPDATE</strong>
  Per request, here is the code used to initially create the mySQL Blob field:</p>
  
  <pre><code>$theJobInfo = serialize($theJobInfo);
  </code></pre>
  
  <p>And SQL query:</p>
  
  <pre><code>UPDATE `jobs` SET `jobInfo` = theJobInfo
  WHERE `folderName` = 'myFolderName'
  </code></pre>