Skip site navigation (1) Skip section navigation (2)

Re: FunctionCallN improvement.

From: a_ogawa <a_ogawa(at)hi-ho(dot)ne(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>,pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FunctionCallN improvement.
Date: 2005-02-02 15:07:09
Message-ID: PIEMIKOOMKNIJLLLBCBBGEJLCEAA.a_ogawa@hi-ho.ne.jp (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane wrote:
> Based on this I think we ought to go with the "unrolled" approach, ie,
> we'll create a macro to initialize the fixed fields of fcinfo but fill
> in the arg and argisnull arrays with code like what's already in
> FunctionCall2:

I agree. The unrolled approach is a good result in most environments. 

I think that a new macro becomes the following:

#define InitFunctionCallInfoData(Fcinfo, Flinfo, Nargs) \
    do {                                                \
        (Fcinfo)->flinfo = Flinfo;                      \
        (Fcinfo)->context = NULL;                       \
        (Fcinfo)->resultinfo = NULL;                    \
        (Fcinfo)->isnull = false;                       \
        (Fcinfo)->nargs = Nargs;                        \
    } while(0)

I think that this macro is effective also in other function such as 
ExecMakeFunctionResultNoSets. However, we should apply that after 
actually examining the effect.

First of all, this macro will be applied only to fmgr.c, but I think 
we better define it in fmgr.h. 

regards,

---
A.Ogawa ( a_ogawa(at)hi-ho(dot)ne(dot)jp )


In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-02-02 15:34:40
Subject: Re: [NOVICE] Last ID Problem
Previous:From: Peter EisentrautDate: 2005-02-02 11:22:50
Subject: libpq API incompatibility between 7.4 and 8.0

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group