Re: tab_to_sting - Mailing list pgsql-general

From Adrian Klaver
Subject Re: tab_to_sting
Date
Msg-id 53D11890.8010507@aklaver.com
Whole thread Raw
In response to tab_to_sting  (Ramesh T <rameshparnanditech@gmail.com>)
Responses Re: tab_to_sting  (Ramesh T <rameshparnanditech@gmail.com>)
List pgsql-general
On 07/24/2014 07:22 AM, Ramesh T wrote:
> SELECT
> qa.tab_to_largestringcheck(cast(array_agg(part_id)as
> t_varchar2_tab),':')FROM qa.part
>
> when i replace string_agg it's return does not exit,

My guess is if you look at the error message it is complaining about the
type of argument passed in.

Please show us the actual error message if that is not the case.

>
> need to enable string_agg ..?i think is predefined right

 From psql:


production=# SELECT version();
                                                            version


-----------------------------------------------------------------------------------------------------------------------------
  PostgreSQL 9.3.4 on i686-pc-linux-gnu, compiled by gcc (SUSE Linux)
4.7.2 20130108 [gcc-4_7-branch revision 195012], 32-bit
(1 row)

production=# \df string_agg
                             List of functions
    Schema   |    Name    | Result data type | Argument data types | Type
------------+------------+------------------+---------------------+------
  pg_catalog | string_agg | bytea            | bytea, bytea        | agg
  pg_catalog | string_agg | text             | text, text          | agg
(2 rows)



--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: tab_to_sting
Next
From: Kevin Grittner
Date:
Subject: Re: Standby Server Bus 7 error