Обсуждение: Re: Function returning any (tuple) type

Поиск
Список
Период
Сортировка

Re: Function returning any (tuple) type

От
Hannes Dorbath
Дата:
On 15.07.2005 08:51, Ezequiel Tolnay wrote:
>
> The main problem I see is that the funcitions in PostgreSQL seem to be
> always bound to a particular result datatype. Is there a way to
> circumvent this?

I tried to find a solution for this as well some time ago. I don't
believe there is a practical way. It's only a guess, maybe this "strong
typing" helps the planer / optimizer in some way..

Re: Function returning any (tuple) type

От
Richard Huxton
Дата:
Hannes Dorbath wrote:
> On 15.07.2005 08:51, Ezequiel Tolnay wrote:
>
>>
>> The main problem I see is that the funcitions in PostgreSQL seem to be
>> always bound to a particular result datatype. Is there a way to
>> circumvent this?
>
>
> I tried to find a solution for this as well some time ago. I don't
> believe there is a practical way. It's only a guess, maybe this "strong
> typing" helps the planer / optimizer in some way..

If that's not what you want, you can always return text (structure it
how you like) or a cursor-reference.

--
   Richard Huxton
   Archonet Ltd