Thread: BUG #1402: getPrecision don't work

BUG #1402: getPrecision don't work

From
"raxfar"
Date:
The following bug has been logged online:

Bug reference:      1402
Logged by:          raxfar
Email address:      raxfar@yahoo.com.tw
PostgreSQL version: 8.0.0-rc2
Operating system:   windows 2000
Description:        getPrecision don't work
Details:

have
java.sql.ResultSetMetaData _oMetaData.getPrecision(i)
java.sql.ResultSetMetaData _oMetaData.getScale(i)
methods not to get Precision and Scale

Re: BUG #1402: getPrecision don't work

From
Kris Jurka
Date:
On Sat, 15 Jan 2005, raxfar wrote:
>
> Bug reference:      1402
> PostgreSQL version: 8.0.0-rc2
> Description:        getPrecision don't work
>
> java.sql.ResultSetMetaData _oMetaData.getPrecision(i)
> java.sql.ResultSetMetaData _oMetaData.getScale(i)
> methods not to get Precision and Scale
>

What underlying data type are you trying to call these methods on?  You
need to provide some more information to describe what you are doing.

Kris Jurka

Re: BUG #1402: getPrecision don't work

From
Oliver Jowett
Date:
raxfar wrote:
> The following bug has been logged online:
>
> Bug reference:      1402
> Logged by:          raxfar
> Email address:      raxfar@yahoo.com.tw
> PostgreSQL version: 8.0.0-rc2
> Operating system:   windows 2000
> Description:        getPrecision don't work
> Details:
>
> have
> java.sql.ResultSetMetaData _oMetaData.getPrecision(i)
> java.sql.ResultSetMetaData _oMetaData.getScale(i)
> methods not to get Precision and Scale

What JDBC driver version are you using?

What is the type of the columns that you are calling getPrecision() and
getScale() on? Do you have an example schema and query I can try out?

What are the results you get? What are the results you expected to get?

-O

Re: BUG #1402: getPrecision don't work

From
Kris Jurka
Date:
On Tue, 18 Jan 2005, Woung raxfar wrote:

> CREATE TABLE users
> (
>   s_no varchar(6),
>   userid varchar(20)
> )

I don't believe getPrecision is intended to operate on non-numeric fields.
Perhaps you are looking for getColumnDisplaySize() ?

Kris Jurka