Skip to content

Commit

Permalink
Merge pull request #1061 from GPCsolutions/group_concat
Browse files Browse the repository at this point in the history
Added group_concat equivalent to PgSQL
  • Loading branch information
eldy committed Jun 19, 2013
2 parents 374718f + 2f8954a commit 5667fce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions htdocs/core/db/pgsql.class.php
Expand Up @@ -177,6 +177,10 @@ static function convertSQLFromMysql($line,$type='auto',$unescapeslashquot=0)
}
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 (preg_match('/ALTER TABLE/i',$line)) $type='dml';
Expand Down

0 comments on commit 5667fce

Please sign in to comment.