Project

General

Profile

Actions

Bug #89350

closed

Column name not getting quotes wich are mandatory on postgres

Added by Gerhard Heide about 5 years ago. Updated about 5 years ago.

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

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

Actions

Also available in: Atom PDF