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

Cannot use select with collate on blob field created with domain [CORE6249] #6493

Closed
firebird-automations opened this issue Feb 17, 2020 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Rudi Feijó (rudi.feijo_multidadosti.com.br)

CREATE DOMAIN DOMAINBLOB AS BLOB SUB_TYPE 0 SEGMENT SIZE 80;
CREATE TABLE TEST ( BLOBFIELD DOMAINBLOB );

select * from test where blobfield collate win_ptbr containing '123';

throws :
Dynamic SQL Error.
SQL error code = -204.
Data type unknown.
Invalid use of CHARACTER SET or COLLATE.

@firebird-automations
Copy link
Collaborator Author

Modified by: Rudi Feijó (rudi.feijo_multidadosti.com.br)

description: CREATE DOMAIN DOMAINBLOB AS BLOB SUB_TYPE 0 SEGMENT SIZE 80;
CREATE TABLE TEST ( BLOBFIELD DOMAINBLOB );

select * from test where blobfield collate win_ptbr containing '123';

throws :
Dynamic SQL Error.
SQL error code = -204.
Data type unknown.
Invalid use of CHARACTER SET or COLLATE.

=>

CREATE DOMAIN DOMAINBLOB AS BLOB SUB_TYPE 0 SEGMENT SIZE 80 CHARACTER SET WIN1252;
CREATE TABLE TEST ( BLOBFIELD DOMAINBLOB );

select * from test where blobfield collate win_ptbr containing '123';

throws :
Dynamic SQL Error.
SQL error code = -204.
Data type unknown.
Invalid use of CHARACTER SET or COLLATE.

@firebird-automations
Copy link
Collaborator Author

Modified by: Rudi Feijó (rudi.feijo_multidadosti.com.br)

description: CREATE DOMAIN DOMAINBLOB AS BLOB SUB_TYPE 0 SEGMENT SIZE 80 CHARACTER SET WIN1252;
CREATE TABLE TEST ( BLOBFIELD DOMAINBLOB );

select * from test where blobfield collate win_ptbr containing '123';

throws :
Dynamic SQL Error.
SQL error code = -204.
Data type unknown.
Invalid use of CHARACTER SET or COLLATE.

=>

CREATE DOMAIN DOMAINBLOB AS BLOB SUB_TYPE 0 SEGMENT SIZE 80;
CREATE TABLE TEST ( BLOBFIELD DOMAINBLOB );

select * from test where blobfield collate win_ptbr containing '123';

throws :
Dynamic SQL Error.
SQL error code = -204.
Data type unknown.
Invalid use of CHARACTER SET or COLLATE.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Sub type 0 is a binary blob, you cannot use collates with binary data,

Try something like this:

CREATE DOMAIN DOMAINBLOB AS BLOB SUB_TYPE TEXT CHARACTER SET WIN1252;

@firebird-automations
Copy link
Collaborator Author

Commented by: Rudi Feijó (rudi.feijo_multidadosti.com.br)

It works in 3.0.3, I understand the current fix of CORE5846 / 6240 is ideal and correct, but since I cannot change blob types or alter their domain/character set, I'm left with the only option of recreating my old blob fields which have no character set.
Would an improvement to be able to change blob's character set be feasible to be considered?

@rudibr78
Copy link

Issue still persists with 3.0.10.
Also with varchar fields I get COLLATION WIN_PTBR for CHARACTER SET NONE is not defined, even if the connection is using WIN1252

@asfernandes
Copy link
Member

The issue is opened, so it has not changed.

And accordingly to the comments, I think it should be closed as wontfix.

@asfernandes asfernandes closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants