Re: pseudo-type record arguments for PL-functions

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: pseudo-type record arguments for PL-functions
Дата
Msg-id 20060506155208.GC4413@svana.org
обсуждение исходный текст
Ответ на Re: pseudo-type record arguments for PL-functions  (Thomas Hallgren <thomas@tada.se>)
Ответы Re: pseudo-type record arguments for PL-functions
Список pgsql-hackers
On Sat, May 06, 2006 at 05:26:31PM +0200, Thomas Hallgren wrote:
> 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.

Looking at contrib/intarray/_int_op.c might help. It does something
like this:
       ArrayType  *a = (ArrayType *) DatumGetPointer(PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)));

The file src/include/utils/array.h also seems to have many useful
functions.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

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

Предыдущее
От: Thomas Hallgren
Дата:
Сообщение: Re: pseudo-type record arguments for PL-functions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pseudo-type record arguments for PL-functions