Re: pseudo-type record arguments for PL-functions

Поиск
Список
Период
Сортировка
От Thomas Hallgren
Тема Re: pseudo-type record arguments for PL-functions
Дата
Msg-id 445CC027.7010504@tada.se
обсуждение исходный текст
Ответ на Re: pseudo-type record arguments for PL-functions  (David Fetter <david@fetter.org>)
Ответы Re: pseudo-type record arguments for PL-functions
Re: pseudo-type record arguments for PL-functions
Список pgsql-hackers
David Fetter wrote:
> On Thu, May 04, 2006 at 09:02:02PM +0200, Thomas Hallgren wrote:
>   
>> Tom Lane wrote:
>>     
>>>> Why can PLs not handle pseudo-types?
>>>>         
>>> No one's done the work to figure out which ones are sensible to
>>> support and then add the logic needed to support them.
>>>
>>>       
>> PL/Java will handle the RECORD type correctly. I'm just finalizing a
>> new, more flexible, type mapping implementation for PL/Java and it
>> would be easy to add support for more pseudo types too. But what
>> others would make sense?
>>     
>
> Ideally, some way to get all kinds of user-defined types.  DOMAINs,
> too. :)
>
>   
OK, got them covered as well. Only thing that remain now is arrays. I 
have a hard time figuring out how to manage them. I'm looking at the 
arrayutils.c. The thing that makes me a bit confused is the 
ArrayMetaState. The functions obtain it using:
   my_extra = (ArrayMetaState *) fcinfo->flinfo->fn_extra;

which is fine if there's only one array parameter. What happens if I 
have two? And how do I declare a function that takes, say, an array of 
int's as a parameter (in SQL that is)?

I find very little information about how to write functions that deals 
with arrays. My only source of information right now is the 
arrayutils.c. Other pointers to docs and code are greatly appreciated.

Kind Regards,
Thomas Hallgren



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Remove behaviour of postmaster -o
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: pseudo-type record arguments for PL-functions