pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Mistake in documentation (PG15+)
2+ messages / 2 participants
[nested] [flat]

* Mistake in documentation (PG15+)
@ 2023-03-24 10:26 PG Doc comments form <noreply@postgresql.org>
  2023-03-24 12:38 ` Re: Mistake in documentation (PG15+) Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2023-03-24 10:26 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: akdmnnakdm@gmail.com

The following documentation comment has been logged on the website:

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

Greetings.

Just found a mistake in documentation:

https://www.postgresql.org/docs/15/datatype-numeric.html
$$
Thus, a column declared as
NUMERIC(2, -3)
will round values to the nearest thousand and can store values between
-99000 and 99000, inclusive.
$$

But the correct range here would be from -99499 to 99499:

select 99499::NUMERIC(2, -3);


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Mistake in documentation (PG15+)
  2023-03-24 10:26 Mistake in documentation (PG15+) PG Doc comments form <noreply@postgresql.org>
@ 2023-03-24 12:38 ` Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Gustafsson @ 2023-03-24 12:38 UTC (permalink / raw)
  To: akdmnnakdm@gmail.com, Pg Docs <pgsql-docs@lists.postgresql.org>

> On 24 Mar 2023, at 11:26, PG Doc comments form <noreply@postgresql.org> wrote:

> But the correct range here would be from -99499 to 99499:
> 
> select 99499::NUMERIC(2, -3);

I'm not sure I see the error you indicate, numeric(2,-3) gives the range
indicated in the documentation:

postgres=# select -99499::numeric(2, -3) as neg,  99499::numeric(2, -3) as pos;
  neg   |  pos
--------+-------
 -99000 | 99000
(1 row)

--
Daniel Gustafsson






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-03-24 12:38 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24 10:26 Mistake in documentation (PG15+) PG Doc comments form <noreply@postgresql.org>
2023-03-24 12:38 ` Daniel Gustafsson <daniel@yesql.se>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox