dblayeroo : Manage the GROUP_CONCAT in PgSQL without error of casting
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4289 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -1621,6 +1621,17 @@ class dblayeroo
|
||||
if (! isset ($func))
|
||||
$this->displayColumn[$getSortOrder] =
|
||||
$distinct.$this->sep.$fieldName.$this->sep;
|
||||
elseif ($func === "string_agg")
|
||||
{
|
||||
// For Postgres, the entry must be :
|
||||
// string_agg(distinct "group"::character varying, ',' order by "group")
|
||||
if ($separator == "")
|
||||
$separator = ", ','";
|
||||
$this->displayColumn[$getSortOrder] =
|
||||
"$func($distinct$this->sep$fieldName$this->sep".
|
||||
"::character varying$separator ".
|
||||
"order by $this->sep$fieldName$this->sep)";
|
||||
}
|
||||
else
|
||||
$this->displayColumn[$getSortOrder] =
|
||||
"$func($distinct$this->sep$fieldName$this->sep$separator)";
|
||||
|
||||
Reference in New Issue
Block a user