On Tue, Dec 20, 2016 at 3:11 AM, Andres Freund <and...@anarazel.de> wrote:
> I think a more efficient variant would make the function signature look
> something like:
>
> Datum /* directly returned argument */
> pgfunc(
>         /* extra information about function call */
>         FunctionCallInfo *fcinfo,
>         /* bitmap of NULL arguments */
>         uint64_t nulls,
>         /* first argument */
>         Datum arg0,
>         /* second argument */
>         Datum arg1,
>         /* returned NULL */
>         bool *isnull
> );

Yeah, that's kind of nice.  I like the uint64 for nulls, although
FUNC_MAX_ARGS > 64 by default and certainly can be configured that
way.  It wouldn't be a problem for any common cases, of course.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to