Re: why declare arg as a array in FunctionCallInfoData structure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tao Ma" <feng_eden(at)163(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: why declare arg as a array in FunctionCallInfoData structure
Date: 2009-02-02 15:34:36
Message-ID: 13296.1233588876@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Tao Ma" <feng_eden(at)163(dot)com> 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 palloc already.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-02-02 15:49:18 Re: parallel restore
Previous Message Robert Haas 2009-02-02 14:50:57 Re: add_path optimization