From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Gregory Stark <gsstark(at)mit(dot)edu> |
Cc: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com>, Brandon Aiken <BAiken(at)winemantech(dot)com>, pgsql general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Precision of data types and functions |
Date: | 2006-08-28 20:26:14 |
Message-ID: | 17581.1156796774@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I wrote:
> No, I think Bruce fixed this recently. It's just a cosmetic mistake in
> the error message so we didn't back-patch it.
No, strike that, I remember the discussion now. The pre-8.2 code is
correct on its own terms, which is that it's telling you what size
number you tried to put in:
regression=# select '123123123123123.2'::numeric(12,2);
ERROR: numeric field overflow
DETAIL: The absolute value is greater than or equal to 10^14 for field with precision 12, scale 2.
regression=# select '12123123123123123.2'::numeric(12,2);
ERROR: numeric field overflow
DETAIL: The absolute value is greater than or equal to 10^16 for field with precision 12, scale 2.
regression=#
Bruce and some other people thought this was confusing, so it's been
changed for 8.2.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tony Caduto | 2006-08-28 20:32:51 | Postgresql mentioned on Newsforge MySQL article |
Previous Message | Joshua D. Drake | 2006-08-28 20:23:16 | Re: Atomicity? |