Re: Time to drop old-style (V0) functions?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Time to drop old-style (V0) functions?
Date: 2016-12-20 13:15:07
Message-ID: CA+TgmoagnrpbM2Pqke2tRs7RfU6chSe5+C_HLxfAROyaAxO=mg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 20, 2016 at 3:11 AM, Andres Freund <andres(at)anarazel(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2016-12-20 13:19:43 Re: increasing the default WAL segment size
Previous Message Robert Haas 2016-12-20 13:10:29 Re: increasing the default WAL segment size