Re: JPOX Types.CHAR error

From: Kris Jurka <books(at)ejurka(dot)com>
To: Andy Jefferson <andy(at)jpox(dot)org>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JPOX Types.CHAR error
Date: 2006-05-16 09:28:01
Message-ID: Pine.BSO.4.63.0605160422370.683@leary2.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message A.M. 2006-05-16 18:15:12 COPY rehashed
Previous Message Kris Jurka 2006-05-16 09:22:32 Re: JPOX Types.CHAR error