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

Re: FunctionCallN improvement.

From: Neil Conway <neilc(at)samurai(dot)com>
To: a_ogawa <a_ogawa(at)hi-ho(dot)ne(dot)jp>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FunctionCallN improvement.
Date: 2005-01-31 23:00:17
Message-ID: 1107212417.12465.50.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, 2005-01-31 at 23:38 +0900, a_ogawa wrote:
> (b)Define the macro that initialize FunctionCallInfoData, and use it 
> instead of MemSet in all FunctionCallN, DirectFunctionCallN, 
> OidFunctionCallN.
>  This macro is the following. 
> 
> #define InitFunctionCallInfoData(Fcinfo, Flinfo, Nargs)     \
>     do {                                                    \
>         (Fcinfo)->flinfo = Flinfo;                          \
>         (Fcinfo)->context = NULL;                           \
>         (Fcinfo)->resultinfo = NULL;                        \
>         (Fcinfo)->isnull = false;                           \
>         (Fcinfo)->nargs = Nargs;                            \
>         MemSet((Fcinfo)->argnull, 0, Nargs * sizeof(bool)); \
>     } while(0)
> 
> I think that plan(b) is better, because source code consistency 
> and efficiency improve.

I agree; I think the macro is a nice improvement to readability. It
would be good to see some benchmarks once the patch is written to verify
that this really does improve performance, but I think it's a good idea.

-Neil



In response to

Responses

pgsql-hackers by date

Next:From: Josh BerkusDate: 2005-01-31 23:13:20
Subject: Re: Allow GRANT/REVOKE permissions to be applied to all schema
Previous:From: Tom LaneDate: 2005-01-31 22:52:40
Subject: Re: [BUGS] Bug in create operator and/or initdb

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