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

Precision and scale of numeric column reported as value -1

From: Sergio Lob <Sergio_Lob(at)iwaysoftware(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Precision and scale of numeric column reported as value -1
Date: 2005-03-23 18:32:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Bug to report - For a numeric in a table defined by:
, the precision and scale reported by ResultSetMetaData.getScale() and
ResultSetMetaData.getPrecision() are value -1

Attached is a simple java program ( that repros the problem.

Before running repro, you must first create the table "SERG" in a
database and then modify the url, userid and password in the program to
appropriate values. Notice that output from program shows precision =
-1, scale = -1

Please note that the problem occurs for NUMERIC columns whose precision
and scale are not explicitely stated. For example a column defined as
NUMERIC(10,2) returns a correct precision and scale.

Thanks, Sergio Lob

Description: application/x-unknown-content-type-visualcafefile.document (2.3 KB)


pgsql-bugs by date

Next:From: Tom LaneDate: 2005-03-23 18:36:33
Subject: Re: [GENERAL] contrib module intagg crashing the backend
Previous:From: Tom LaneDate: 2005-03-23 17:24:06
Subject: Re: BUG #1518: Conversions to (undocumented) SQL year-month and

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