Author: rareddy
Date: 2011-06-28 16:18:26 -0400 (Tue, 28 Jun 2011)
New Revision: 3286
Modified:
branches/7.1.1.CP3/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
Log:
TEIID-1653: correcting the regex to account for sql with new line characters
Modified:
branches/7.1.1.CP3/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
===================================================================
---
branches/7.1.1.CP3/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java 2011-06-28
19:58:01 UTC (rev 3285)
+++
branches/7.1.1.CP3/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java 2011-06-28
20:18:26 UTC (rev 3286)
@@ -137,7 +137,7 @@
private static Pattern preparedAutoIncrement = Pattern.compile("select 1 \\s*from
pg_catalog.pg_attrdef \\s*where adrelid = \\$1 AND adnum = \\$2 " + //$NON-NLS-1$
"\\s*and pg_catalog.pg_get_expr\\(adbin, adrelid\\) \\s*like
'%nextval\\(%'", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
- private static Pattern cursorSelectPattern = Pattern.compile("DECLARE
\"(\\w+)\" CURSOR(\\s(WITH HOLD|SCROLL))? FOR (.*)",
Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ public static Pattern cursorSelectPattern = Pattern.compile("DECLARE
\"(\\w+)\" CURSOR(\\s(WITH HOLD|SCROLL))? FOR (.*)",
Pattern.CASE_INSENSITIVE|Pattern.DOTALL); //$NON-NLS-1$
private static Pattern fetchPattern = Pattern.compile("FETCH (\\d+) IN
\"(\\w+)\".*", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
private static Pattern movePattern = Pattern.compile("MOVE (\\d+) IN
\"(\\w+)\".*", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
private static Pattern closePattern = Pattern.compile("CLOSE
\"(\\w+)\"", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$