ParameterMetaData getPrecision() always zero? - Mailing list pgsql-jdbc

From Simon Temple
Subject ParameterMetaData getPrecision() always zero?
Date
Msg-id 3CF1F297-BA57-4725-830E-DD282228A284@amalto.com
Whole thread Raw
Responses Re: ParameterMetaData getPrecision() always zero?  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Driver: postgresql-8.4-701.jdbc4
Server: 8.4
OS: Mac OSX

<snip>
    ParameterMetaData m = stat.getParameterMetaData(  );

    if ( null != m ) {

        int colWidth = m.getPrecision( parameterIndex );

        // colWidth == 0 means 'not applicable'
        if ( colWidth > 0 ) {
<snip>

I have the same behaviour with many different tables.  

For varchar columns I would expect to get the maximum column width.  So 8 for a varchar(8).

I always get zero as a result.

I get non zero values from H2 and Derby drivers.

Is this a bug or have I missed something?

TIA

Simon Temple


pgsql-jdbc by date:

Previous
From: Wolfgang Rinnert
Date:
Subject: Re: java.net.SocketException: Network is unreachable
Next
From: Andrew Lindesay
Date:
Subject: LIKE and ESCAPING in JDBC Select Statement