Re: tab_to_sting

From: Ramesh T <rameshparnanditech(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: tab_to_sting
Date: 2014-07-24 14:46:10
Message-ID: CAK8Zd=tizkdFV9=0Nu8yfKZLnUABb2q_egry5fgWa9Xje8ZPOw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

On Thu, Jul 24, 2014 at 8:00 PM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> 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(dot)klaver(at)aklaver(dot)com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Grittner 2014-07-24 14:48:19 Re: Standby Server Bus 7 error
Previous Message Adrian Klaver 2014-07-24 14:30:40 Re: tab_to_sting