Re: Numeric multiplication overflow errors

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Re: Numeric multiplication overflow errors
Дата
Msg-id CAEudQAoMT3_1FdWuiPkkL7M6S2ZMgGFG-SprGnkg99oJ7VhYiQ@mail.gmail.com
обсуждение исходный текст
Ответ на Numeric multiplication overflow errors  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: Numeric multiplication overflow errors
Список 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

В списке pgsql-hackers по дате отправления: