Re: tab_to_sting

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: tab_to_sting
Дата
Msg-id 53D122E8.7010307@aklaver.com
обсуждение исходный текст
Ответ на tab_to_sting  (Ramesh T <rameshparnanditech@gmail.com>)
Список 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.klaver@aklaver.com


В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: tab_to_sting
Следующее
От: Ramesh T
Дата:
Сообщение: Re: tab_to_sting