Bug #67668

PostgreSQL needs escaping for BLOB fields

Added by Morton Jonuschat about 1 month ago.

Status:New Start date:2015-06-21
Priority:Should have Due date:
Assigned To:Morton Jonuschat % Done:

0%

Category:DBAL Spent time: -
Target version:7.4 (Backend)
TYPO3 Version:7 Is Regression:No
PHP Version:5.6 Sprint Focus:
Complexity:medium

Description

PostgreSQL requires data in BYTEA (BLOB) columns needs to be escaped for PostgreSQL, otherwise queries fail with:

Core: Error handler (BE): PHP Warning: pg_query(): Query failed: ERROR: invalid input syntax for type bytea LINE 9: 'O:44:"TYPO3\CMS\Extbase\Object\Container\ClassInfo":6:{... ^ in /Users/mjonuschat/Documents/Development/TYPO3/Sites/postgresql/TYPO3.CMS/typo3/sysext/adodb/adodb/drivers/adodb-postgres7.inc.php line 219

Manual
bq. The bytea type supports two external formats for input and output: PostgreSQL's historical "escape" format, and "hex" format. Both of these are always accepted on input. The output format depends on the configuration parameter bytea_output; the default is hex. (Note that the hex format was introduced in PostgreSQL 9.0; earlier versions and some tools don't understand it.)


Related issues

related to Core - Bug #67059: AdoDB error with PostgreSQL New 2015-05-20

Also available in: Atom PDF