-
Notifications
You must be signed in to change notification settings - Fork 855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArrayIndexOutOfBoundsException for unclosed dollar quoted string in statement #688
Comments
Can we see the code that created that ? |
Well, it's liquibase migration. So, I don't have code. |
@raderio , can you provide more details?
In the mean time, this passes for me with Oracle jdk1.8.0_102 public class StatementTest ... {
...
public void testPlpgsql() throws SQLException {
String str = "CREATE OR REPLACE FUNCTION update_on_change() RETURNS TRIGGER AS $$\n"
+ "BEGIN\n"
+ "NEW.updated_at = NOW();\n"
+ "RETURN NEW;\n"
+ "END;\n"
+ "$$ language 'plpgsql';";
PreparedStatement ps = null;
try {
ps = con.prepareStatement(str);
System.out.println("ps.executeUpdate() = " + ps.executeUpdate());
} finally {
TestUtil.closeQuietly(ps);
}
} |
as does this for me: Connection con = con.prepareStatement("CREATE OR REPLACE FUNCTION update_on_change() Dave Cramer On 14 November 2016 at 08:55, Vladimir Sitnikov notifications@github.com
|
Thank you. I think It's liquibase bug. |
"Unterminated dollar quote" leads to public void testPlpgsql() throws SQLException {
String str = "CREATE OR REPLACE FUNCTION update_on_change() RETURNS TRIGGER AS $$\n"
+ "BEGIN\n"
+ "NEW.updated_at = NOW();\n"
+ "RETURN NEW;\n"
+ "END;";
PreparedStatement ps = null;
try {
ps = con.prepareStatement(str);
System.out.println("ps.executeUpdate() = " + ps.executeUpdate());
} finally {
TestUtil.closeQuietly(ps);
}
}
|
The text was updated successfully, but these errors were encountered: