getArray() and char[] - Mailing list pgsql-jdbc

From Jeffrey Cox
Subject getArray() and char[]
Date
Msg-id 6F3C7223-5334-4EAA-8A81-9F2A0414FB1A@gmail.com
Whole thread Raw
Responses Re: getArray() and char[]
List 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

pgsql-jdbc by date:

Previous
From: Jeffrey Cox
Date:
Subject: Re: getProcedureColumns
Next
From: Jeffrey Cox
Date:
Subject: getArray and char[] - patches