pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeffrey Cox <namredips@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: getArray and char[] - patches
Date: Thu, 1 Feb 2007 06:19:51 -0500
Message-ID: <CE30C6AD-8C6D-45AE-ABEC-E40E68080E76@gmail.com> (raw)

I was going to attach patches explanation purposes to the previous  
postl, but forgot... they are attached to this post


Jeff

Attachments: download all (2 files, .tar.gz)

AbstractJdbc2Array.java.patch (application/octet-stream, 910B) download Index: org/postgresql/jdbc2/AbstractJdbc2Array.java =================================================================== RCS file: /usr/local/cvsroot/pgjdbc/pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Array.java,v retrieving revision 1.18 diff -u -r1.18 AbstractJdbc2Array.java --- org/postgresql/jdbc2/AbstractJdbc2Array.java 4 Dec 2005 21:40:33 -0000 1.18 +++ org/postgresql/jdbc2/AbstractJdbc2Array.java 1 Feb 2007 11:15:14 -0000 @@ -199,6 +199,10 @@ ((double[])retVal)[i++] = AbstractJdbc2ResultSet.toDouble( arrayContents[(int)index++] ); break; case Types.CHAR: + retVal = new Character[ count ]; + for ( ; count > 0; count-- ) + ((Character[])retVal)[i++] = arrayContents[(int)index++].charAt(0) ; + break; case Types.VARCHAR: retVal = new String[ count ]; for ( ; count > 0; count-- )
TypeInfoCache.java.patch (application/octet-stream, 1.0K) download Index: org/postgresql/jdbc2/TypeInfoCache.java =================================================================== RCS file: /usr/local/cvsroot/pgjdbc/pgjdbc/org/postgresql/jdbc2/TypeInfoCache.java,v retrieving revision 1.6 diff -u -r1.6 TypeInfoCache.java --- org/postgresql/jdbc2/TypeInfoCache.java 3 Nov 2006 07:15:16 -0000 1.6 +++ org/postgresql/jdbc2/TypeInfoCache.java 1 Feb 2007 11:16:56 -0000 @@ -58,6 +58,7 @@ {"float4", new Integer(Oid.FLOAT4), new Integer(Types.REAL), "java.lang.Float"}, {"float8", new Integer(Oid.FLOAT8), new Integer(Types.DOUBLE), "java.lang.Double"}, {"bpchar", new Integer(Oid.BPCHAR), new Integer(Types.CHAR), "java.lang.String"}, + {"char", new Integer(Oid.CHAR), new Integer(Types.CHAR), "java.lang.Character"}, {"varchar", new Integer(Oid.VARCHAR), new Integer(Types.VARCHAR), "java.lang.String"}, {"text", new Integer(Oid.TEXT), new Integer(Types.VARCHAR), "java.lang.String"}, {"name", new Integer(Oid.NAME), new Integer(Types.VARCHAR), "java.lang.String"},

Message-ID: <CE30C6AD-8C6D-45AE-ABEC-E40E68080E76@gmail.com>
Permalink:  ../CE30C6AD-8C6D-45AE-ABEC-E40E68080E76@gmail.com/
Also on:    postgresql.org/message-id/CE30C6AD-8C6D-45AE-ABEC-E40E68080E76@gmail.com

 ·  · 

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: namredips@gmail.com
  Subject: Re: getArray and char[] - patches
  In-Reply-To: <CE30C6AD-8C6D-45AE-ABEC-E40E68080E76@gmail.com>
  References: <CE30C6AD-8C6D-45AE-ABEC-E40E68080E76@gmail.com>

* 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