Skip to content
Snippets Groups Projects
Commit 5667fceb authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #1061 from GPCsolutions/group_concat

Added group_concat equivalent to PgSQL
parents 374718f7 2f8954ac
Branches main
No related tags found
No related merge requests found
...@@ -177,6 +177,10 @@ class DoliDBPgsql ...@@ -177,6 +177,10 @@ class DoliDBPgsql
} }
if ($line != "") if ($line != "")
{ {
// group_concat support (PgSQL >= 9.1)
$line = preg_replace('/GROUP_CONCAT/i', 'STRING_AGG', $line);
$line = preg_replace('/ SEPARATOR/i', ',', $line);
if ($type == 'auto') if ($type == 'auto')
{ {
if (preg_match('/ALTER TABLE/i',$line)) $type='dml'; if (preg_match('/ALTER TABLE/i',$line)) $type='dml';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment