why declare arg as a array in FunctionCallInfoData structure - Mailing list pgsql-hackers

From Tao Ma
Subject why declare arg as a array in FunctionCallInfoData structure
Date
Msg-id gm66jg$2jf4$1@news.hub.org
Whole thread Raw
Responses Re: why declare arg as a array in FunctionCallInfoData structure  (Martijn van Oosterhout <kleptog@svana.org>)
Re: why declare arg as a array in FunctionCallInfoData structure  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: why declare arg as a array in FunctionCallInfoData structure  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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?

Thanks in advance. 




pgsql-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: foreign_data test fails with non-C locale
Next
From: Martijn van Oosterhout
Date:
Subject: Re: why declare arg as a array in FunctionCallInfoData structure