From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Ramesh T <rameshparnanditech(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: tab_to_sting |
Date: | 2014-07-24 15:14:48 |
Message-ID: | 53D122E8.7010307@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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...
I should have explained what is going on here.
If you do:
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)
you see that there are two variations of string_agg, one that accepts
text, text and the other that accepts bytea, bytea as input. When you
ran your function it was passing in a single character varying input to
string_agg. This is not a supported string_agg variation, so Postgres
reports it does not exist in that form. See the HINT below.
> ^
> HINT: No function matches the given name and argument types. You might
> need to add explicit type casts.
>
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Francisco Olarte | 2014-07-24 17:05:17 | Re: Referencing serial col's sequence for insert |
Previous Message | Ramesh T | 2014-07-24 15:03:08 | Re: tab_to_sting |