pgsql: Fix numeric_maximum_size() calculation. - Mailing list pgsql-committers

From rhaas@postgresql.org (Robert Haas)
Subject pgsql: Fix numeric_maximum_size() calculation.
Date
Msg-id 20100804173309.CDC377541D7@cvs.postgresql.org
Whole thread Raw
List 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)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix sloppy mistakes in documentation of PQescapeLiteral and
Next
From: rhaas@postgresql.org (Robert Haas)
Date:
Subject: pgsql: Fix declared argument name for numeric_maximum_size.