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