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
Alternate quoting does not work on some particular cases [CORE6340] #6581
Comments
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 4.0 RC 1 [ 10930 ] |
Commented by: @pavel-zotov It seems that <alternate START char> (see "README.alternate_string_quoting.txt") must differ from <alternate END char> when single quote ( ' ) is used as text to be printed: select q'!That's a string!' from rdb$database; -- works OK (this is example from doc) No such problems with: select q'< ' >' from rdb$database; |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Deferred Test Details: See note 24/Jun/20 04:36 AM |
Modified by: @asfernandesComponent: ISQL [ 10003 ] |
Commented by: @asfernandes That was another problem in ISQL. Please test again. |
Commented by: @pavel-zotov echo set heading off; select q'!#'!' from rdb$database; | isql /:e40 -q (OK, expected) echo set heading off; select q'!''!' from rdb$database; | isql /:e40 -q (OK, expected) echo set heading off; select q'!'!!' from rdb$database; | isql /:e40 -q (OK, expected) But:C:\FBTESTING\qa\misc>echo set heading off; select q'!!'!' from rdb$database; | isql /:e40 -q The same for -- i.e. wher sequence <alternate END char> + single_quote presents within string. Checked on build 4.0.0.2073 with timestamp 24.06.2020 13:40. |
Commented by: @asfernandes > -- i.e. wher sequence <alternate END char> + single_quote presents within string. <alternate END char> + single_quote defines end of string. How could it be within a string? |
Commented by: @pavel-zotov IMO, end of string which starts with q'! must be defined by !' which are LAST two characters of this string literal. |
Commented by: @asfernandes It's different case. Double single quote in single quote string is like a escape. In Oracle the alternate string literal works like our current behavior. It stops in first <alternate END char> + single_quote. There is no escape on it. You can choose a start/end character to not need escapes. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Deferred => Done successfully Test Details: See note 24/Jun/20 04:36 AM => |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @asfernandesFix Version: 3.0.7 [ 10940 ] |
Submitted by: @pavel-zotov
1) select q'{} }' from rdb$database; -- works OK
2) select q'{{}' from rdb$database; -- also OK
3) select q'{}}' from rdb$database; -- note: there is no space between "}}"
Last statement raises:
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 1, column 9.
'{}}'.
Checked on 4.0.0.2070; 3.0.6.33322
Commits: 5d961c0 84f5c8e c117620
The text was updated successfully, but these errors were encountered: