Martijn van Oosterhout wrote:
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,
Yes, the intarray stuff was very helpful but also somewhat confusing.
Why are there two ways of representing some of the array types? I mean,
why is there an _int4 when you could just as well write int4[]? I'm
probably missing the point altogether.
Regards,
Thomas Hallgren
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings