Fix [2521586] - Postgres conversion error
https://sourceforge.net/tracker2/?func=detail&atid=879332&aid=2521586&group_id=176962
This commit is contained in:
parent
fd421d842c
commit
f516d38ba5
|
@ -217,7 +217,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
|
|||
final String PATTERN_String = "\'([^']|(''))*\'";
|
||||
final String PATTERN_DataType = "([\\w]+)(\\(\\d+\\))?";
|
||||
final String pattern =
|
||||
"CAST[\\s]*\\([\\s]*" // CAST<sp>(<sp>
|
||||
"\\bCAST\\b[\\s]*\\([\\s]*" // CAST<sp>(<sp>
|
||||
+"(("+PATTERN_String+")|([^\\s]+))" // arg1 1(2,3)
|
||||
+"[\\s]*AS[\\s]*" // <sp>AS<sp>
|
||||
+"("+PATTERN_DataType+")" // arg2 (datatype) 4
|
||||
|
|
|
@ -462,4 +462,14 @@ public final class Convert_PostgreSQLTest extends TestCase{
|
|||
String[] r = convert.convert(sql.toString());
|
||||
assertEquals(sqle.toString(), r[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test BF [ 2521586 ] Postgres conversion error
|
||||
*/
|
||||
public void test2521586() {
|
||||
sql = "INSERT INTO M_Forecast (M_Forecast_ID) VALUES (1000000)";
|
||||
sqe = "INSERT INTO M_Forecast (M_Forecast_ID) VALUES (1000000)";
|
||||
r = convert.convert(sql);
|
||||
assertEquals(sqe, r[0]);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue