Re: Return unknown resultset from a function

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Return unknown resultset from a function
Дата
Msg-id CAFj8pRAz7Ad4RNF0L_NOWZE83Du4D5xUu7+74auSEpaeD3cXbw@mail.gmail.com
обсуждение исходный текст
Ответ на Return unknown resultset from a function  (Jan Meyland Andersen <jma@agile.dk>)
Список pgsql-general
Hello

2012/3/4 Jan Meyland Andersen <jma@agile.dk>:
> How do I return an unknown resultset from a function
>
> My main problem is that I do not know how many columns or the data type of
> the columns before runtime.
> It this possible at all?
>

no, or it is not possible simply. PostgreSQL is strongly typed.

I know only one workaround - using refcursor

http://okbob.blogspot.com/2008/08/using-cursors-for-generating-cross.html

Regards

Pavel Stehule

> I also tried to return the data as a text array but I also have trouble with
> that.
>
> Regards
>
> Jan
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Jan Meyland Andersen
Дата:
Сообщение: Return unknown resultset from a function
Следующее
От: David Johnston
Дата:
Сообщение: Re: Return unknown resultset from a function