I just converted to PostgreSQL from MySQL. In PostgreSQL my field (jobInfo
) is a blob in (bytea
) format.
SELECT folderName, jobInfo
FROM jobs
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:
\x613a31353a7b733a31373a2266696c65466f726d617456657273696f6e223b733a333a22342e30223b733a373a226a6f62 [.....]
Is there a way, in PHP or postgres, to decode that back to the serialized string of text characters?
UPDATE Per request, here is the code used to initially create the mySQL Blob field:
$theJobInfo = serialize($theJobInfo);
And SQL query:
UPDATE `jobs` SET `jobInfo` = theJobInfo
WHERE `folderName` = 'myFolderName'