X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 57FF69F944D for ; Tue, 16 May 2006 06:28:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 04834-08 for ; Tue, 16 May 2006 06:28:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by postgresql.org (Postfix) with SMTP id 9F0459F9CEE for ; Tue, 16 May 2006 06:28:04 -0300 (ADT) Received: (qmail 4449 invoked by uid 1112); 16 May 2006 09:28:01 -0000 Date: Tue, 16 May 2006 04:28:01 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary2.csoft.net To: Andy Jefferson cc: pgsql-jdbc@postgresql.org Subject: Re: JPOX Types.CHAR error In-Reply-To: <200605161113.01181.andy@jpox.org> Message-ID: References: <200605160908.05250.andy@jpox.org> <200605161057.09782.andy@jpox.org> <200605161108.46840.andy@jpox.org> <200605161113.01181.andy@jpox.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/57 X-Sequence-Number: 15185 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