Re: array function problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: array function problem
Дата
Msg-id 24127.1205729454@sss.pgh.pa.us
обсуждение исходный текст
Ответ на array function problem  (tuanhoanganh <hatuan05@gmail.com>)
Список pgsql-general
tuanhoanganh <hatuan05@gmail.com> writes:
> I call it by command
> select temp.rowfromarray(string_to_array('1,2,3,4,5', ','));
> but it have error
> ERROR:  set-valued function called in context that cannot accept a set

You need to say
    select * from temp.rowfromarray(string_to_array('1,2,3,4,5', ','));

plpgsql functions returning SETOF have to be called within the FROM
clause of a SELECT.

            regards, tom lane

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

Предыдущее
От: tuanhoanganh
Дата:
Сообщение: array function problem
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: PG secure for financial applications ...