Re: Precision and scale of numeric column reported as value - Mailing list pgsql-bugs

From Sergio Lob
Subject Re: Precision and scale of numeric column reported as value
Date
Msg-id 4241DBF2.6040807@iwaysoftware.com
Whole thread Raw
In response to Re: Precision and scale of numeric column reported as value  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: Precision and scale of numeric column reported as value  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Re: Precision and scale of numeric column reported as value  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Re: Precision and scale of numeric column reported as value  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-bugs
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.
Sergio

Oliver Jowett wrote:

> Sergio Lob wrote:
>
>> Bug to report - For a numeric in a table defined by:
>> CREATE TABLE SERG (F01NUM NUMERIC) ;
>> , the precision and scale reported by ResultSetMetaData.getScale() and
>> ResultSetMetaData.getPrecision() are value -1
>
>
> What should they return instead in this case?
>
> -O
>

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #1518: Conversions to (undocumented) SQL year-month and
Next
From: Roy Badami
Date:
Subject: Re: BUG #1518: Conversions to (undocumented) SQL year-month and