Skip site navigation (1) Skip section navigation (2)

Re: Precision and scale of numeric column reported as value

From: Sergio Lob <Sergio_Lob(at)iwaysoftware(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: 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:13:22
Message-ID: 4241DBF2.6040807@iwaysoftware.com (view raw or flat)
Thread:
Lists: 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
>


In response to

Responses

pgsql-bugs by date

Next:From: Roy BadamiDate: 2005-03-23 21:14:48
Subject: Re: BUG #1518: Conversions to (undocumented) SQL year-month and
Previous:From: Bruce MomjianDate: 2005-03-23 21:10:22
Subject: Re: BUG #1518: Conversions to (undocumented) SQL year-month and

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group