From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Thomas Hallgren <thomas(at)tada(dot)se> |
Cc: | David Fetter <david(at)fetter(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pseudo-type record arguments for PL-functions |
Date: | 2006-05-06 15:52:08 |
Message-ID: | 20060506155208.GC4413@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-05-06 15:54:59 | Re: pseudo-type record arguments for PL-functions |
Previous Message | Thomas Hallgren | 2006-05-06 15:26:31 | Re: pseudo-type record arguments for PL-functions |