Project

General

Profile

Actions

Bug #30886

closed

Problems with Postgresql 9

Added by Gerald Buttinger about 13 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2011-10-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Epic #64459: Make TYPO3 run on PostgreSQLClosed2015-05-21

Actions
Actions #1

Updated by Ernesto Baschny over 12 years ago

  • Target version deleted (4.5.7)
  • TYPO3 Version set to 4.5

We have updated AdoDB (5.14) in TYPO3 4.5.8, this problem is fixed? Acording to the Changelog of AdoDB 5.12:

  • Postgres: Use pg_unescape_bytea() in _decode.

Source: http://sourceforge.net/projects/adodb/files/adodb-php5-only/adodb-512-for-php5/

So this is potentially fixed already. Could you please re-check? Thanks!

Actions #2

Updated by Michael Stucki almost 11 years ago

  • Category deleted (PostgreSQL)
Actions #3

Updated by Michael Stucki almost 11 years ago

  • Project changed from 329 to TYPO3 Core
Actions #4

Updated by Michael Stucki almost 11 years ago

  • Category set to 999
Actions #5

Updated by Mathias Schreiber almost 10 years ago

  • Status changed from New to Closed
  • Is Regression set to No

We will continue in the Epic #64459. I think 99% of these reports can be drilled down to the same root cause.

Actions

Also available in: Atom PDF