Re: tab_to_sting - Mailing list pgsql-general

From Ramesh T
Subject Re: tab_to_sting
Date
Msg-id CAK8Zd=syzeejnTQ19and7u-k8j07LuQfBjsaes5iGUz6oPHyDQ@mail.gmail.com
Whole thread Raw
In response to Re: tab_to_sting  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: tab_to_sting  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
I have try 
select string_agg(partname,':') from part_tab;    its return same,

ERROR:  function string_agg(bigint, unknown) does not exist
LINE 1: select string_agg(part_id,':') from part;
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

i  thought string_agg and array_agg same, is it right..? 




On Thu, Jul 24, 2014 at 8:19 PM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 07/24/2014 07:46 AM, Ramesh T wrote:
i ran the \df string_agg is their

but retuns like
ERROR:  function string_agg(character varying) does not exist
LINE 2: qa.tab_to_largestringcheck(cast(string_agg(part_num)as t_var...
                                         ^
HINT:  No function matches the given name and argument types. You might
need to add explicit type casts.



Please, do not top post.

Also try the query I sent you off-list:


SELECT deptno, string_agg(employee, ',')
FROM   emp
GROUP BY deptno;

Forget about the t_varcha2_tab type.



--
Adrian Klaver
adrian.klaver@aklaver.com

pgsql-general by date:

Previous
From: Ramesh T
Date:
Subject: Re: tab_to_sting
Next
From: Francisco Olarte
Date:
Subject: Re: Referencing serial col's sequence for insert