Issue Bug Closed

#89350Column name not getting quotes wich are mandatory on postgres

Gerhard Heide 10/05/19, 15:14 updated 10/08/19, 20:31

Description

referencing colPos from typoscript FLUIDTEMPLATE like so

mycontent < styles.content.get
mycontent.select.where = colPos = 0

Results in the frontend throwing an Doctrine\DBAL\Exception\InvalidFieldNameException

An exception occurred … ‘SELECT * FROM “tt_content” WHERE … (colPos = 0) …
… HINT: Vielleicht wurde beabsichtigt, auf die Spalte »tt_content.colPos« zu verweisen.

Meaning of the Error: since upper case is a special char for postgres quotes are required around the column name eg. “colPos” not colPos, colpos or “colpos”.

I expected this database naming conventions to be handled by DBAL.

Workaround – add the missing quotes to typoscript yourself:

mycontent.select.where = "colPos" = 0

Typo3 9.5.9 LTS
Postgres 10.7
php driver pdo_pgsql

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.