Skip to content
Snippets Groups Projects
Commit 3990e8a6 authored by Stefan Bürk's avatar Stefan Bürk
Browse files

[BUGFIX] Ensure `DB Check`->`Full Search` module works with PostgresSQL

PostgresSQL is really picky about types and used operators. Thus using
for example a `like` comparision on non string/text based fields fails
hard. Database errors like following indicates this issue:

>  Undefined function: 7 ERROR: operator does not exist:
>  smallint ~~ unknown

This changes implicit converts field data to a text representation
for PostgresSQL, if field is not compatible. In case of small/tinyint
fields a double cast is used, means casting to integer and then to
string before applying the like comparison on it.

The choosen solution is used to have a comparible behaviour against the
other supported dbms systems like MariaDB, MySQL and SQLite, also doing
a full search on all fields may be a bad decision. The whole search and
full-search across all types should be reconsidered generally.

Resolves: #98563
Releases: main, 11.5
Change-Id: I4dde0e49bf8fd68a01b50aeabc12c24398fb6ac9
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76055


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
parent e911f029
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment