Re: [HACKERS] why declare arg as a array in FunctionCallInfoData structure

2009-02-03 Thread Tao Ma
Thank you guys... -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] why declare arg as a array in FunctionCallInfoData structure

2009-02-02 Thread Tom Lane
"Tao Ma" writes: > 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? Speed. We spend enough cycles in

Re: [HACKERS] why declare arg as a array in FunctionCallInfoData structure

2009-02-02 Thread Pavel Stehule
2009/2/2 Tao Ma : > 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'

Re: [HACKERS] why declare arg as a array in FunctionCallInfoData structure

2009-02-02 Thread Martijn van Oosterhout
On Mon, Feb 02, 2009 at 03:16:01PM +0800, Tao Ma wrote: > 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 f

[HACKERS] why declare arg as a array in FunctionCallInfoData structure

2009-02-02 Thread Tao Ma
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 p