2009/2/2 Tao Ma <feng_eden@163.com>:
> hi,
>
> When I read the postgresql codes, I noticed that the FunctionCallInfoData
> structure(declared in the src/include/fmgr.h) contains two arrays 'arg' and
> 'argnull'.
> Why don't you declare it as a pointer and allocate the memory from heap? It
> saves more momery if 'arg' and 'argnull' declares as pointer type.
>
> Can anyone explain it to me?
>
It based on Datum data type, that store short fixed values directly
(int, float), and you need second array, that carries info about NULL
or NOT NULL. Bigger problem is some non consistency - sometime this is
bool array, and sometime array of char.
Regards
Pavel Stehule
> Thanks in advance.
>
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>