Skip to content
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

On PostgreSql the alternate quote string literal is not detected if it is not followed by a space. #1948

jMediaConverter opened this issue Mar 8, 2018 · 1 comment


Copy link

Which version and edition of Flyway are you using?

Community Edition 5.0.7

If this is not the latest version, can you reproduce the issue with the latest one as well?

(Many bugs are fixed in newer releases and upgrading will often resolve the issue)

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

java API

Which database are you using (type & version)?

PostgreSQL 9.6

Which operating system are you using?

Does not matter.

What did you do?

(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)

I am trying to run with flyway a SQL file containing the following function definition:
return '';
$$LANGUAGE plpgsql;

An ArrayOutOfBoundsException is thrown. The cause appears to be the fact that there is no space after the $$ alternate quote token on the last line. However this is a valid script that I can run in the PG query tool.

What did you expect to see?

No errors.

What did you see instead?

An exception is thrown.

Copy link

Good catch and thank for the snippet to reproduce! Fixed.

dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
…s not detected if it is not followed by a space
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants