Index: Array.java =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/jdbc2/Array.java,v retrieving revision 1.18 diff -C10 -r1.18 Array.java *** Array.java 6 Sep 2002 21:23:06 -0000 1.18 --- Array.java 29 May 2003 19:37:19 -0000 *************** *** 84,116 **** { char[] chars = rawString.toCharArray(); StringBuffer sbuf = new StringBuffer(); boolean foundOpen = false; boolean insideString = false; for ( int i = 0; i < chars.length; i++ ) { if ( chars[i] == '\\' ) //escape character that we need to skip i++; ! if ( chars[i] == '{' ) { if ( foundOpen ) // Only supports 1-D arrays for now throw org.postgresql.Driver.notImplemented(); foundOpen = true; continue; } ! if ( chars[i] == '"' ) { insideString = !insideString; continue; } ! if ( (!insideString && chars[i] == ',') || chars[i] == '}' || i == chars.length - 1) { if ( chars[i] != '"' && chars[i] != '}' && chars[i] != ',' ) sbuf.append(chars[i]); array.add( sbuf.toString() ); sbuf = new StringBuffer(); continue; } sbuf.append( chars[i] ); } } --- 84,117 ---- { char[] chars = rawString.toCharArray(); StringBuffer sbuf = new StringBuffer(); boolean foundOpen = false; boolean insideString = false; for ( int i = 0; i < chars.length; i++ ) { if ( chars[i] == '\\' ) //escape character that we need to skip i++; ! else if (!insideString && chars[i] == '{' ) { if ( foundOpen ) // Only supports 1-D arrays for now throw org.postgresql.Driver.notImplemented(); foundOpen = true; continue; } ! else if (chars[i] == '"') { insideString = !insideString; continue; } ! else if (!insideString && (chars[i] == ',' || chars[i] == '}') || ! i == chars.length - 1) { if ( chars[i] != '"' && chars[i] != '}' && chars[i] != ',' ) sbuf.append(chars[i]); array.add( sbuf.toString() ); sbuf = new StringBuffer(); continue; } sbuf.append( chars[i] ); } }