Fix numeric_maximum_size() calculation.

Robert Haas <rhaas@postgresql.org>

Commit: 97f38001acc61449f7ac09c539ccc29e40fecd26
Author: Robert Haas <rhaas@postgresql.org>
Date: 2010-08-04T17:33:09Z
Releases: 9.1.0
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.

Files

PathChange+/−
src/backend/utils/adt/numeric.c modified +25 −6