pgsql: Fix numeric_maximum_size() calculation.

From: rhaas(at)postgresql(dot)org (Robert Haas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix numeric_maximum_size() calculation.
Date: 2010-08-04 17:33:09
Message-ID: 20100804173309.CDC377541D7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix numeric_maximum_size() calculation.

The old computation can sometimes underestimate the necessary space
by 2 bytes; however we're not back-patching this, because this result
isn't used for anything critical. Per discussion with Tom Lane,
make the typmod test in this function match the ones in numeric()
and apply_typmod() exactly.

Modified Files:
--------------
pgsql/src/backend/utils/adt:
numeric.c (r1.125 -> r1.126)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/numeric.c?r1=1.125&r2=1.126)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2010-08-04 17:35:59 pgsql: Fix declared argument name for numeric_maximum_size.
Previous Message Tom Lane 2010-08-04 16:27:13 pgsql: Fix sloppy mistakes in documentation of PQescapeLiteral and