Re: pseudo-type record arguments for PL-functions

From: Thomas Hallgren <thomas(at)tada(dot)se>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
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 22:16:16
Message-ID: 445D2030.40301@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-05-06 23:10:07 Re: bug? non working casts for domain
Previous Message Thomas Hallgren 2006-05-06 21:48:52 Re: pseudo-type record arguments for PL-functions