-
-
Notifications
You must be signed in to change notification settings - Fork 262
Fix implicitly used collations after ALTER DOMAIN #8434
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
Conversation
|
IIRC this change can break the case when field is defined with domain and explicit collation. Most likely both conditions must be checked here. |
True. But this seems to be against the SQL standard:
So perhaps this should be disallowed rather than fixed. |
|
I see no rationale behind this piece of standard but the decision is on you. BTW, changing of collation requires index rebuild. If you change collation of domain, will every index on every domain-based field be rebuilt automatically? |
|
IIRC, yes, indices are rebuilt. |
Personally, I don't see much value in this feature, but it seems it was supported before your PR, so this becomes a backward compatibility issue. |
|
In this case IMHO it must be a rule at the parser level that COLLATE clause cannot be used with domains. |
|
As such a change wasn't suggested in the original discussion (although mentioned as deviation from the standard), I will not change it for the time being. |
…1627: ALTER DOMAIN supporting collation change
|
Currently only UTF8 charset is checked - see notes in the test file. |
This is a postfix for PR #7748. Before this PR, if the field's collation was derived from some domain, RDB$COLLATION_ID was not filled inside RDB$RELATION_FIELDS and collation was inherited from the domain definition. Now it's broken.
Test case:
Expected: