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
Using binary string literal to assign to user-defined blob sub-types yield conversion error "filter not found to convert type 1 to type -13" [CORE6389] #2352
Comments
Modified by: @mrotteveeldescription: Attempts to assign a value to an user-defined blob sub-type yields a conversion error. SQL> create table blob13(id integer generated by default as identity primary key, blobfield blob sub_type -13); Workaround: add an explicit cast to either blob sub_type binary or blob sub_type -13 It looks like binary string literals are handled like normal strings, and therefor coerced to blob sub_type text, while they should be coerced to blob sub_type binary instead. => Attempts to assign a value to a user-defined blob sub-type yields a conversion error. SQL> create table blob13(id integer generated by default as identity primary key, blobfield blob sub_type -13); Workaround: add an explicit cast to either blob sub_type binary or blob sub_type -13 It looks like binary string literals are handled like normal strings, and therefor coerced to blob sub_type text, while they should be coerced to blob sub_type binary instead (which would then allow them to be applied to a user-defined sub-type like sub_type -13 without issue). |
Modified by: @mrotteveeldescription: Attempts to assign a value to a user-defined blob sub-type yields a conversion error. SQL> create table blob13(id integer generated by default as identity primary key, blobfield blob sub_type -13); Workaround: add an explicit cast to either blob sub_type binary or blob sub_type -13 It looks like binary string literals are handled like normal strings, and therefor coerced to blob sub_type text, while they should be coerced to blob sub_type binary instead (which would then allow them to be applied to a user-defined sub-type like sub_type -13 without issue). => Attempts to assign a value to a user-defined blob sub-type yields a conversion error. SQL> create table blob13(id integer generated by default as identity primary key, blobfield blob sub_type -13); Workaround: add an explicit cast to either blob sub_type binary or blob sub_type -13 It looks like binary string literals (character set OCTETS) are handled like normal strings, and therefor coerced to blob sub_type text, while they should be coerced to blob sub_type binary instead (which would then allow them to be applied to a user-defined sub-type like sub_type -13 without issue). |
Modified by: @mrotteveeldescription: Attempts to assign a value to a user-defined blob sub-type yields a conversion error. SQL> create table blob13(id integer generated by default as identity primary key, blobfield blob sub_type -13); Workaround: add an explicit cast to either blob sub_type binary or blob sub_type -13 It looks like binary string literals (character set OCTETS) are handled like normal strings, and therefor coerced to blob sub_type text, while they should be coerced to blob sub_type binary instead (which would then allow them to be applied to a user-defined sub-type like sub_type -13 without issue). => Attempts to assign a binary string-literal value to a user-defined blob sub-type yields a conversion error. SQL> create table blob13(id integer generated by default as identity primary key, blobfield blob sub_type -13); Workaround: add an explicit cast to either blob sub_type binary or blob sub_type -13 It looks like binary string literals (character set OCTETS) are handled like normal strings, and therefor coerced to blob sub_type text, while they should be coerced to blob sub_type binary instead (which would then allow them to be applied to a user-defined sub-type like sub_type -13 without issue). |
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 ] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Done successfully |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @mrotteveel
Attempts to assign a binary string-literal value to a user-defined blob sub-type yields a conversion error.
SQL> create table blob13(id integer generated by default as identity primary key, blobfield blob sub_type -13);
SQL> insert into blob13 (blobfield) values (x'ab01');
Statement failed, SQLSTATE = HY000
filter not found to convert type 1 to type -13
SQL>
Workaround: add an explicit cast to either blob sub_type binary or blob sub_type -13
It looks like binary string literals (character set OCTETS) are handled like normal strings, and therefor coerced to blob sub_type text, while they should be coerced to blob sub_type binary instead (which would then allow them to be applied to a user-defined sub-type like sub_type -13 without issue).
Commits: ca049a7
The text was updated successfully, but these errors were encountered: