diff options
author | Barry Lind <barry@xythos.com> | 2003-07-21 20:48:31 +0000 |
---|---|---|
committer | Barry Lind <barry@xythos.com> | 2003-07-21 20:48:31 +0000 |
commit | 80bbd3281d9f598779c363bc792b2d2c9a8b48c3 (patch) | |
tree | dbb837dce5b8ace37f3d274cba6429ae9469e619 /src/interfaces/jdbc/org/postgresql/jdbc2/Array.java | |
parent | ec7aa4b51545e0c1c69acc0cf135d9c229f61d11 (diff) | |
download | postgresql-80bbd3281d9f598779c363bc792b2d2c9a8b48c3.tar.gz |
Applied patch from dmitry@openratings.com to fix parsing of array values
Modified Files:
jdbc/org/postgresql/Driver.java.in
jdbc/org/postgresql/jdbc2/Array.java
Diffstat (limited to 'src/interfaces/jdbc/org/postgresql/jdbc2/Array.java')
-rw-r--r-- | src/interfaces/jdbc/org/postgresql/jdbc2/Array.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/Array.java b/src/interfaces/jdbc/org/postgresql/jdbc2/Array.java index 973da1d2b0..418a094263 100644 --- a/src/interfaces/jdbc/org/postgresql/jdbc2/Array.java +++ b/src/interfaces/jdbc/org/postgresql/jdbc2/Array.java @@ -98,19 +98,20 @@ public class Array implements java.sql.Array if ( chars[i] == '\\' ) //escape character that we need to skip i++; - if ( chars[i] == '{' ) + else if (!insideString && chars[i] == '{' ) { if ( foundOpen ) // Only supports 1-D arrays for now throw org.postgresql.Driver.notImplemented(); foundOpen = true; continue; } - if ( chars[i] == '"' ) + else if (chars[i] == '"') { insideString = !insideString; continue; } - if ( (!insideString && chars[i] == ',') || chars[i] == '}' || i == chars.length - 1) + else if (!insideString && (chars[i] == ',' || chars[i] == '}') || + i == chars.length - 1) { if ( chars[i] != '"' && chars[i] != '}' && chars[i] != ',' ) sbuf.append(chars[i]); |