Re: [GENERAL] numeric field overflow

2009-10-09 Thread Bruce Momjian
David W Noon wrote: On Tue, 6 Oct 2009 12:20:11 +0600, Nurzhan Kirbassov wrote about [GENERAL] numeric field overflow: [snip] So, does the precision part of the numeric type really means number of digits to the left of the decimal point, or what ? No. The precision is the *total

[GENERAL] numeric field overflow

2009-10-06 Thread Nurzhan Kirbassov
Good day. I may be misunderstanding the NUMERIC type description in the manual, so can anyone please help me with this? Description says: The scale of a numeric is the count of decimal digits in the fractional part, to the right of the decimal point. The precision of a numeric is the total count

Re: [GENERAL] numeric field overflow

2009-10-06 Thread Christophe Pettus
On Oct 5, 2009, at 11:20 PM, Nurzhan Kirbassov wrote: So, does the precision part of the numeric type really means number of digits to the left of the decimal point, or what ? NUMERIC is behaving as documented. The way to think of it is when you are inserting: INSERT INTO

Re: [GENERAL] numeric field overflow

2009-10-06 Thread Scott Marlowe
On Tue, Oct 6, 2009 at 12:20 AM, Nurzhan Kirbassov km.same...@gmail.com wrote: Good day. I may be misunderstanding the NUMERIC type description in the manual, so can anyone please help me with this? Description says: The scale of a numeric is the count of decimal digits in the fractional

Re: [GENERAL] numeric field overflow

2009-10-06 Thread Scott Ribe
However, I am not able to insert numbers that have number of digits equal to the precision and the scale equal to 0. Scale applies to the *column*. You defined your column to have a scale of 1, so you can't just claim that your value has scale 0 and claim an extra digit to the left of the

Re: [GENERAL] numeric field overflow

2009-10-06 Thread David W Noon
On Tue, 6 Oct 2009 12:20:11 +0600, Nurzhan Kirbassov wrote about [GENERAL] numeric field overflow: [snip] So, does the precision part of the numeric type really means number of digits to the left of the decimal point, or what ? No. The precision is the *total* number of decimal digits, both