Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 49F649FA356 for ; Thu, 1 Feb 2007 07:20:03 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 12341-03 for ; Thu, 1 Feb 2007 07:19:54 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.176]) by postgresql.org (Postfix) with ESMTP id D25EF9FA2FC for ; Thu, 1 Feb 2007 07:19:54 -0400 (AST) Received: by py-out-1112.google.com with SMTP id a73so256941pye for ; Thu, 01 Feb 2007 03:19:53 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:to:message-id:content-type:from:subject:date:x-mailer; b=gXYlrA2ggzCie4a0J0+kLuHqmksUnMXHfMIsZPfDm62i+LcLOzXGjkzugUpPG1s58jHEb9NJtgfBAJHcMEnzEaCCmehrqHl0xsCtPKNXkDSInNuXIe2MIYil/Xj4U/oWyvij66YuHzH5/2gWSEb+ooYF9HJwFwwJZPn42PG4Gtc= Received: by 10.35.111.14 with SMTP id o14mr834089pym.1170328793451; Thu, 01 Feb 2007 03:19:53 -0800 (PST) Received: from ?172.16.12.223? ( [12.192.18.226]) by mx.google.com with ESMTP id n29sm2985615pyh.2007.02.01.03.19.52; Thu, 01 Feb 2007 03:19:53 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v752.3) To: pgsql-jdbc@postgresql.org Message-Id: Content-Type: multipart/mixed; boundary=Apple-Mail-1-895546494 From: Jeffrey Cox Subject: getArray and char[] - patches Date: Thu, 1 Feb 2007 06:19:51 -0500 X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/3 X-Sequence-Number: 16559 --Apple-Mail-1-895546494 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed I was going to attach patches explanation purposes to the previous postl, but forgot... they are attached to this post Jeff --Apple-Mail-1-895546494 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=AbstractJdbc2Array.java.patch Content-Disposition: attachment; filename=AbstractJdbc2Array.java.patch 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-- ) --Apple-Mail-1-895546494 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=TypeInfoCache.java.patch Content-Disposition: attachment; filename=TypeInfoCache.java.patch 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"}, --Apple-Mail-1-895546494--