Re: Numeric multiplication overflow errors

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: dean(dot)a(dot)rasheed(at)gmail(dot)com, David Rowley <dgrowleyml(at)gmail(dot)com>
Subject: Re: Numeric multiplication overflow errors
Date: 2021-07-02 18:48:22
Message-ID: CAEudQAoMT3_1FdWuiPkkL7M6S2ZMgGFG-SprGnkg99oJ7VhYiQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2 Jul 2021 at 22:55, Dean Rasheed
<dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
> Here's an update with the
> last set of changes discussed.
If you allow me a small suggestion.
Move the initializations of the variable tmp_var to after check if the
function can run.
Saves some cycles, when not running.

/* Ensure we disallow calling when not in aggregate context */
if (!AggCheckCallContext(fcinfo, NULL))
elog(ERROR, "aggregate function called in non-aggregate context");

+ init_var(&tmp_var);
+

regards,
Ranier Vilela

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-07-02 19:16:37 Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)
Previous Message Tom Lane 2021-07-02 18:23:40 Re: Increase value of OUTER_VAR