getArray() and char[]

From: Jeffrey Cox <namredips(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: getArray() and char[]
Date: 2007-02-01 11:14:22
Message-ID: 6F3C7223-5334-4EAA-8A81-9F2A0414FB1A@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

While looking into updating getProcedureColumns, to appropriately
return COLUMN_TYPE, ran into a 'not implemented' exception. Seems
that getArray is not implemented for arrays of type char. Kinda fuzzy
on all this, but walked the code and ultimately added an entry in
TypeInfoCache for 'char' and then updated AbstractJdbc2Array to
handle 'char' as a java.lang.Character[] rather than java.lang.String[]

it seems that the issue was that char[] was being identified as
Types.OTHER in TypeInfoCache. Which fixed the unimplemented error.
However, considering char[] as a String caused getArray() to return a
string containing leading and trailing curly brackets. Hence the
change to AbstractJdbc2Array.

Am I missing something, or is there another way around this?

Jeff

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jeffrey Cox 2007-02-01 11:19:51 getArray and char[] - patches
Previous Message Jeffrey Cox 2007-02-01 06:19:33 Re: getProcedureColumns