Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1voLqO-001tAh-0j for pgsql-docs@arkaria.postgresql.org; Fri, 06 Feb 2026 13:25:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1voLqL-003yDv-1z for pgsql-docs@arkaria.postgresql.org; Fri, 06 Feb 2026 13:25:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1voLqL-003yDn-17 for pgsql-docs@lists.postgresql.org; Fri, 06 Feb 2026 13:25:53 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1voLqJ-00000000qTt-0ReL for pgsql-docs@lists.postgresql.org; Fri, 06 Feb 2026 13:25:52 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4806b43beb6so7281355e9.3 for ; Fri, 06 Feb 2026 05:25:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1770384349; x=1770989149; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=FZSfUrvD4toTN8r4BFIed9d4hqXXxJbJXg3GYHnAl18=; b=L5hdL+gf1cerQU9/+y6k2nwRUep88bFWCfgoXNZe+qP+fBnFyYwSEXKJMfGy/7rbks CV7jM/3xO5l2IfKya7t1E1/HfvQIYcKHECwdvGJPPXqHzBMusI4+Ynv9Pw1x1202W036 WEuTObsfjw0uKHXPIHS8E6kotWyEUtveiTqWaOQr5g8j8eO13yFV5pdfTjQ6WMjYyYO/ 5zxXRAZIyQTnN1ygEIvo3Da6ghdicl5xg8Tvxx0E0lRVoGSO2OYAjnQjacVYV134Yzbs qXUz09ZZV8Kcx3L6edde/UlkFxqIUuKdCVEejFdXlKQety8EuzcIlAkYske+LhRNcLes /b5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770384349; x=1770989149; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FZSfUrvD4toTN8r4BFIed9d4hqXXxJbJXg3GYHnAl18=; b=shjMozgBasX4np7BUu5WyhSCqb/bXGSkc069K8GY57O7Mn9aqSuf1ibLHtWotG4Omk +rCNlGyOTni7QNfTzYLKeJZMjZL/1SUuKmvCA/Ce/Xmzwq46bftjDZq4Hux5OBjXbanJ Pq85BZRZVDSvW4knCLZHmyzWApjM3EXrqWcWt+Gl7vEV4smK64K8LS6QABg7F8KQPX8e JzNsubwUgq2QVqkgQJp+QMdOztt4Y+pO8rRptpj0VGHbdTtsBipkqWyAWATVm+5KEDGn DcBJusDCxL+BLXfEXyTXCP1QPBaBuidD6xsvyG/BLVvWKNuIax8CIuBKh0lyHiLd0pon xl3A== X-Forwarded-Encrypted: i=1; AJvYcCUKIXOn0i5GHD3xiiH/AAZ5Ktp+AKi8YPcFo1abWNYUgOJ0ny1ALFjJd2d5Kb9SBQTPsi9A80QBsNKD@lists.postgresql.org X-Gm-Message-State: AOJu0YzbgsiJbTIZo7DFQP3O8YQpNJ869eBenf+khaKIkXvnduE5hqpN 8l/bJSO0Qh4SlkoX/lf2V4p0cpN03K4+uQGELmxXUcXIVNEGtMzF0q/ClTe4pozLEHIEvnggwSO StBnCGpc= X-Gm-Gg: AZuq6aL1VPCEZaCi6yhtnpjRMa0jC6I/6waBuYoBjjurCbMxqQPvVZSElhUl5NyFiW3 r9NC0mGVsIKHLRw7ENRFkqU7z3aSNM66ZBRD+aK7+/X2y6BAPVKi9UX7KW+xQVSQ85kKtwI14t6 OsYHBqayYQN7JP1xd23J3YKBlWmCwPYIBNOtUyHmCWvdfODAHKZ2o4F2gG/CoZTEDWQRsOYjrgf Vx5JbL/uzDQzkwDJ8YlZGlInOBJf/4GJIYtOY8VuJSuE4rGj7rKKVQLL0lxM56Zlk6kRNRM7JXV mDYO2cj10ADieEJMDO7C3+kr6oqBhmWU851/fuUVP589GceD0SMHNIFiwu6aRoXpYFi99ee0ZMr kfGuzzna0mXOPjF3VcPrzzMow3uAyQY/4UDhcvFyLnQ4HHnOzp4rPv+8X+mC0KQANG1tP4ZdRIi 0ztQlS1VaHb6aqAY+NKY67NQDWOFbHMRB0w5FgQwoU3g== X-Received: by 2002:a05:600c:8489:b0:47a:9560:5944 with SMTP id 5b1f17b1804b1-48320229bbfmr40123005e9.34.1770384349508; Fri, 06 Feb 2026 05:25:49 -0800 (PST) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:260:5269:e994:478a:1aaa:cd34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48317d345c2sm170227045e9.6.2026.02.06.05.25.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 05:25:49 -0800 (PST) Message-ID: <7a4932f87675aef7cabf61279e9ee05ee9c528fd.camel@cybertec.at> Subject: Re: Problem with example numeric value From: Laurenz Albe To: gquercini@gmail.com, pgsql-docs@lists.postgresql.org Date: Fri, 06 Feb 2026 14:25:48 +0100 In-Reply-To: <177037321050.792.15666380012670173502@wrigleys.postgresql.org> References: <177037321050.792.15666380012670173502@wrigleys.postgresql.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.2 (3.58.2-1.fc43) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2026-02-06 at 10:20 +0000, PG Doc comments form wrote: > 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 t= hat > are allowed are -99499 to 99499 inclusive. test=3D> CREATE TABLE t (n NUMERIC(2, -3)); CREATE TABLE test=3D> INSERT INTO t VALUES (99499); INSERT 0 1 test=3D> TABLE t; n =20 ------- 99000 (1 row) It will *store* 99000, even if you *insert* 99499. I'd say that the documentation is correct. Yours, Laurenz Albe