Re: [BUGS] Precision and scale of numeric column reported as value

2005-03-23 Thread Tom Lane
Oliver Jowett <[EMAIL PROTECTED]> writes: > There appears to be no default, which is why we currently return -1. The spec's notion of a "default precision and scale" is that every numeric column has a specific precision and scale --- ie, is physically fixed-width --- and everything you store into

Re: [BUGS] Precision and scale of numeric column reported as value

2005-03-23 Thread Oliver Jowett
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. Yes, I understand that. The error only occurs for a column defined as NUMERIC (without precis

Re: [BUGS] Precision and scale of numeric column reported as value

2005-03-23 Thread Stephan Szabo
On Wed, 23 Mar 2005, 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

Re: [BUGS] Precision and scale of numeric column reported as value

2005-03-23 Thread Alvaro Herrera
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

Re: [BUGS] Precision and scale of numeric column reported as value

2005-03-23 Thread Sergio Lob
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

Re: [BUGS] Precision and scale of numeric column reported as value

2005-03-23 Thread Oliver Jowett
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 -

[BUGS] Precision and scale of numeric column reported as value -1

2005-03-23 Thread Sergio Lob
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 Attached is a simple java program (Repro1.java) that repros the problem. Before running re