fix(legacy): support Postgresql 12 syntax (#3103)

fixes #3102
This commit is contained in:
Thomas Göttgens 2024-10-20 00:20:30 +02:00 committed by GitHub
parent 188cd5d671
commit 0b221f4fff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -1596,7 +1596,7 @@ SQL;
}
if ($spCriteria == 'filepath') {
$spCriteria = "split_part(filepath, '/', -1)";
$spCriteria = "reverse(split_part(reverse(filepath), '/', 1))";
}
if ($i > 0 && $prevgroup == $group) {

View File

@ -750,7 +750,7 @@ SQL;
} elseif ($key === 'filepath') {
$plSelect[] = 'NULL::VARCHAR AS ' . $key;
$blSelect[] = 'NULL::VARCHAR AS ' . $key;
$fileSelect[] = "split_part({$key}, '/', -1) as {$key}";
$fileSelect[] = "reverse(split_part(reverse({$key}), '/', 1)) as {$key}";
$streamSelect[] = 'url AS ' . $key;
} elseif ($key == 'mime') {
$plSelect[] = 'NULL::VARCHAR AS ' . $key;