getArray() fails to handle some string array cases - Mailing list pgsql-jdbc

From Oliver Jowett
Subject getArray() fails to handle some string array cases
Date
Msg-id 20030720133327.GK32403@opencloud.com
Whole thread Raw
Responses Re: getArray() fails to handle some string array cases  (Dima Tkach <dmitry@openratings.com>)
List pgsql-jdbc
While playing with an implementation of setArray() I've found a case where
the existing getArray() implementation does not parse an array result
correctly. The attached testcase produces:

    [junit] Testcase: testStringArray(org.postgresql.test.jdbc2.GetArrayTest):  FAILED
    [junit] driver element 2: expected:<"> but was:<,',\>
    [junit] junit.framework.AssertionFailedError: driver element 2: expected:<"> but was:<,',\>
    [junit]     at org.postgresql.test.jdbc2.GetArrayTest.testStringArray(GetArrayTest.java:125)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [junit]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

I'm not going to have time to track the cause of this down, but maybe the
testcase is useful to someone else.

-O

Attachment

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: patch: fix exceptions from ResultSet.getArray()
Next
From: pginfo
Date:
Subject: Re: jdbc batch performance problem