Support VARCHAR/VARBINARY without explicit length#8909
Merged
mrotteveel merged 2 commits intoFirebirdSQL:masterfrom Feb 18, 2026
Merged
Support VARCHAR/VARBINARY without explicit length#8909mrotteveel merged 2 commits intoFirebirdSQL:masterfrom
mrotteveel merged 2 commits intoFirebirdSQL:masterfrom
Conversation
Contributor
|
Instead of doubling branches I would introduce |
Member
Author
I also have to track |
dyemanov
requested changes
Feb 17, 2026
dyemanov
approved these changes
Feb 17, 2026
Member
Author
|
@dyemanov Any objections if I merge? (The build failure is a transient failure that occurs regularly on macOS.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, Firebird doesn't have a default length for VARCHAR/CHARACTER VARYING, { NCHAR | NATIONAL {CHAR|CHARACTER} } VARYING, and VARBINARY/BINARY VARYING.
This PR adds a default length of 255 for all these types.
Why 255:
Why at all:
CAST(something as VARCHAR)(see also second point under "Why 255"), which can be a simplification for query generatorsFor reference, the SQL:2023 standard requires such a default, as 6.1 <data type> defines:
With syntax rule 6 (for BINARY) and 7 (for VARCHAR/NCHAR VARYING) specifying:
See also thread Introducing a default VARCHAR length on firebird-devel.