You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We got the following error recently while running SQLcl's 'lb update' command using a liquibase formatted sql changeset: Non supported SQL92 token at position 123.
I could track it down to code (function, procedure, package, etc.) using the Q Quote operator with matching characters in the string being escaped.
Steps To Reproduce
Given the following controller (main.controller.xml):
--liquibase formatted sql--changeset user:123 runOnChange:truecreate or replacefunctionqq_test
return varchar2asbegin
return q'| foo || bar |';
end;
Running this command would result in the error:
lb update -changelog-file main.controller.xml
Here’s another example changeset that would throw the same error, only using * instead of |:
--liquibase formatted sql--changeset dan:123 runOnChange:truecreate or replacefunctionqq_test
return varchar2asbegin
return q'* foo ** bar *';
end;
While the Q Quote operator is Oracle-specific, I wouldn't think that would matter here as the code should simply be passed through to be executed, no?
Here's an example of a changeset that uses the Q Quote operator without any issues...
--liquibase formatted sql--changeset dan:123 runOnChange:truecreate or replacefunctionqq_test
return varchar2asbegin
return q'* foo bar *';
end;
It seems that either Liquibase or JDBC is trying to parse the SQL and doesn't recognize the syntax, though it's completely valid in Oracle. I'm not a Java developer so I can't easily test at that level. Any ideas as to what the source of the problem could be?
The text was updated successfully, but these errors were encountered:
I am also facing the same issue and fixed the same using the '~' sign
Here's an example of a changeset that uses the Q Quote operator without any issues...
create or replacefunctionqq_test
return varchar2asbegin
return q'~ foo || bar ~';
end;
Environment
Liquibase Version: 4.17.0
Liquibase Extension(s) & Version: Oracle's SQLcl 22.4.0.0
Database Vendor & Version: Oracle Database 19c
Operating System Type & Version: macOS 11.7
Infrastructure Type/Provider: Oracle Cloud
Description
We got the following error recently while running SQLcl's 'lb update' command using a
liquibase formatted sql
changeset: Non supported SQL92 token at position 123.I could track it down to code (function, procedure, package, etc.) using the Q Quote operator with matching characters in the string being escaped.
Steps To Reproduce
Given the following controller (main.controller.xml):
And the following changeset (test.sql):
Running this command would result in the error:
Here’s another example changeset that would throw the same error, only using
*
instead of|
:While the Q Quote operator is Oracle-specific, I wouldn't think that would matter here as the code should simply be passed through to be executed, no?
Here's an example of a changeset that uses the Q Quote operator without any issues...
It seems that either Liquibase or JDBC is trying to parse the SQL and doesn't recognize the syntax, though it's completely valid in Oracle. I'm not a Java developer so I can't easily test at that level. Any ideas as to what the source of the problem could be?
The text was updated successfully, but these errors were encountered: