Index: AbstractJdbc2Array.java =================================================================== RCS file: /cvsroot/jdbc/pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Array.java,v retrieving revision 1.19 diff -c -r1.19 AbstractJdbc2Array.java *** AbstractJdbc2Array.java 10 Sep 2007 08:34:31 -0000 1.19 --- AbstractJdbc2Array.java 20 Nov 2007 18:29:45 -0000 *************** *** 103,108 **** --- 103,110 ---- StringBuffer sbuf = new StringBuffer(); boolean foundOpen = false; boolean insideString = false; + boolean isQuoted = false; + boolean haveMinServerVersion82 = conn.haveMinimumServerVersion("8.2"); /** * Starting with 8.0 non-standard (beginning index *************** *** 142,147 **** --- 144,150 ---- else if (chars[i] == '"') { insideString = !insideString; + isQuoted = true; continue; } else if (!insideString && (chars[i] == ',' || chars[i] == '}') || *************** *** 149,156 **** { if ( chars[i] != '"' && chars[i] != '}' && chars[i] != ',' ) sbuf.append(chars[i]); ! array.add( sbuf.toString() ); sbuf = new StringBuffer(); continue; } sbuf.append( chars[i] ); --- 152,160 ---- { if ( chars[i] != '"' && chars[i] != '}' && chars[i] != ',' ) sbuf.append(chars[i]); ! array.add( sbuf.toString().equals("NULL") && !isQuoted && haveMinServerVersion82 ? null : sbuf.toString() ); sbuf = new StringBuffer(); + isQuoted = false; continue; } sbuf.append( chars[i] );