mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
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
This commit is contained in:
src/interfaces/jdbc/org/postgresql
@ -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]);
|
||||
|
Reference in New Issue
Block a user