Bug #30886
closedProblems with Postgresql 9
0%
Description
I encountered the following problem using typo3 (v. 4.5.6) with postgresql9:
Blobs (data type "bytea") in postgres9 are returned in a HEX-output-format (at least with a default configuration of postgres9).
see: http://www.postgresql.org/docs/9.0/static/datatype-binary.html:
"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.)"
This results in the inability of typo3 to read data from bytea-fields.
Examples would be:
- table "cache_hash", field "content".
(The symtomatic of this is, that a typo3-page is output correctly with an empty cache, but after that only a blank page is returned.
- table "fe_session_data", field "content".
(This results in the inability to return fe-user-session-data, e.g. for extensions, etc.)
A workaround is to change the parameter "bytea_output" of the postgres-config from it's default value "hex" to the value "escape".
But imho, typo3 should also work with a default-installation of postgres.
A different solution would be to set the "bytea_output" for every db-connection. Postgres allows this via the following command:
"set bytea_output to escape". Unfortunatelely a postgres-connection via dbal does not allow a "setDBinit"-configuration, thus a user cannot add this by himself by editing his localconf.php. But a hardcoded solution would probably be better anyway.
But i guess the base of the problem is that adodb is seemingly not fully compatible with postgres9.