Re: Precision and scale of numeric column reported as value

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Sergio Lob <Sergio_Lob(at)iwaysoftware(dot)com>
Cc: Oliver Jowett <oliver(at)opencloud(dot)com>, pgsql-bugs(at)postgresql(dot)org, Ephraim Spravtsev <Ephraim_Spravtsev(at)ibi(dot)com>
Subject: Re: Precision and scale of numeric column reported as value
Date: 2005-03-23 21:25:05
Message-ID: 20050323212505.GB5487@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Mar 23, 2005 at 04:13:22PM -0500, Sergio Lob wrote:
> Precision is the number of total digits in the number. Scale is the
> number of fractional digits.
> For instance, a column defined as NUMERIC(10,3) should return
> precision=10, scale=3. The error only occurs for a column defined as
> NUMERIC (without precision or scale specified). Presumably, there is a
> default precision and scale assigned to the column by postgreSQL, which
> is not -1.

That assumption is wrong. There is no default.

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"La primera ley de las demostraciones en vivo es: no trate de usar el sistema.
Escriba un guión que no toque nada para no causar daños." (Jakob Nielsen)

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephan Szabo 2005-03-23 21:26:39 Re: Precision and scale of numeric column reported as value
Previous Message Roy Badami 2005-03-23 21:14:48 Re: BUG #1518: Conversions to (undocumented) SQL year-month and