pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Andy Jefferson <andy@jpox.org>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JPOX Types.CHAR error
Date: Tue, 16 May 2006 04:28:01 -0500 (EST)
Message-ID: <Pine.BSO.4.63.0605160422370.683@leary2.csoft.net> (raw)
In-Reply-To: <200605161113.01181.andy@jpox.org>
References: <200605160908.05250.andy@jpox.org>
	<200605161057.09782.andy@jpox.org>
	<200605161108.46840.andy@jpox.org>
	<200605161113.01181.andy@jpox.org>



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




view thread (9+ messages)

Message-ID: <Pine.BSO.4.63.0605160422370.683@leary2.csoft.net>
Permalink:  ../Pine.BSO.4.63.0605160422370.683@leary2.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.63.0605160422370.683@leary2.csoft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, andy@jpox.org
  Subject: Re: JPOX Types.CHAR error
  In-Reply-To: <Pine.BSO.4.63.0605160422370.683@leary2.csoft.net>
  References: <200605160908.05250.andy@jpox.org> <200605161057.09782.andy@jpox.org> <200605161108.46840.andy@jpox.org> <200605161113.01181.andy@jpox.org> <Pine.BSO.4.63.0605160422370.683@leary2.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox