Subject: Problem with example numeric value

From: PG Doc comments form <[email-masked]>
Date: Fri, 06 Feb 2026 10:20:10 +0000

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/18/datatype-numeric.html
Description:

In the page https://www.postgresql.org/docs/current/datatype-numeric.html it
is said that NUMERIC(2, -3) will round values to the nearest thousand and
can store values between -99000 and 99000. However, the range of values that
are allowed are -99499 to 99499 inclusive.

---

From: Laurenz Albe <[email-masked]>
Date: Fri, 06 Feb 2026 14:25:48 +0100

> are allowed are -99499 to 99499 inclusive.

  test=> CREATE TABLE t (n NUMERIC(2, -3));
  CREATE TABLE
  test=> INSERT INTO t VALUES (99499);
  INSERT 0 1
  test=> TABLE t;
     n   
  -------
   99000
  (1 row)

It will *store* 99000, even if you *insert* 99499.
I'd say that the documentation is correct.

Yours,
Laurenz Albe