Re: JPOX Types.CHAR error - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: JPOX Types.CHAR error
Date
Msg-id Pine.BSO.4.63.0605160422370.683@leary2.csoft.net
Whole thread Raw
In response to Re: JPOX Types.CHAR error  (Andy Jefferson <andy@jpox.org>)
List pgsql-jdbc

On Tue, 16 May 2006, Andy Jefferson wrote:

>> Also, I cannot do bpchar(100) whereas I can do char(100) ... the precision
>> returned by getTypeInfo is limited to 9 for bpchar whereas is 65000 for
>> char.
>
> Ignore that. All Postgresql types returned by getTypeInfo() return the
> precision as 9 ... whatever that is supposed to mean. Any chance that
> Postgresql JDBC will one day return correct info for the precision ? It
> would make life a hell of a lot easier for systems that use the results
> of its JDBC method calls.
>

Improvements have already been made in this are for the 8.2 driver (which
can be used against older database versions).  It currently reports
10485760 as the precision for bpchar.

The complication on your part is that bpchar is kind of an internal type
name and you've already noticed that you can't say CREATE TABLE t (a
bpchar(5)).  The grammar only supports the precision attribute on the
external spelling of the type name, char or character.  I'm not sure how
the pg jdbc driver can help you know this.

Kris Jurka


pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: JPOX Types.CHAR error
Next
From: "A.M."
Date:
Subject: COPY rehashed