Re: Add overflow test in function numeric_exp.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yang Xiao <YangX92(at)hotmail(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add overflow test in function numeric_exp.
Date: 2018-10-09 14:19:12
Message-ID: 23215.1539094752@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yang Xiao <YangX92(at)hotmail(dot)com> writes:
> The attachment is the proposal patch for function numeric_exp in
> src/backend/utils/adt/numeric.c.

Why do we need this? numeric_exp() already detects result overflow.

regression=# select numeric_exp(10000);
ERROR: value overflows numeric format

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-10-09 14:22:08 Re: Support custom socket directory in pg_upgrade
Previous Message Pavel Stehule 2018-10-09 14:13:03 Re: Index Skip Scan