Re: getColumns() - workaround - Mailing list pgsql-jdbc

From Auri Mason
Subject Re: getColumns() - workaround
Date
Msg-id Pine.LNX.4.44.0204041534030.6799-100000@mendeleev.syntrex.com
Whole thread Raw
In response to Re: getColumns()  (Dave Cramer <dave@fastcrypt.com>)
Responses Re: getColumns() - workaround  (Auri Mason <amason@syntrex.com>)
Re: getColumns() - workaround  (Dave Cramer <Dave@micro-automation.net>)
List pgsql-jdbc
I've find the workaround for postreSQL

//->>>>>>>>>>>>the following returns no rows!
ResultSet rs = dma.getColumns(getCatalog(), getSchema(), tableName.toUpperCase(), fieldName.toUpperCase());

//->>>> the following WORKS FINE!
ResultSet rs = dma.getColumns("", "",tableName.toLowerCase(), fieldName.toLowerCase());

BTW, it doesn't work if tablename is a view :(

--
Auri



On 3 Apr 2002, Dave Cramer wrote:

> Auri,
>
> AFAIK this works, can you give me specifics?
>
> ie db version, columns, code sample, etc.
>
> Dave
> On Wed, 2002-04-03 at 11:22, Auri Mason wrote:
> > Hi list,
> >
> > in my applications I use getColumns() method to retrieve the size of some
> > fileds to avoid the exceed of the field size during an insert.
> > This procedure works fine with oracle, DB2 and MSsql JDBC but seems it
> > doesn't work (return a null) with the postgresql JDBC driver (feb 9 2002
> > release).
> > Anyone of you has some note/fix/workaround about this?
> >
> > p.s. I use % as schema


pgsql-jdbc by date:

Previous
From: "Nick Fankhauser"
Date:
Subject: Re: JDBC Driver Problem
Next
From: Barry Lind
Date:
Subject: Re: Fwd: org/postgresql/jdbc2/ResultSet.java