Repository navigation
fix: mark TEXT as the preferred SQL_VARCHAR type-info row - #4
Merged
Merged
Conversation
…XT row TEXT now leads SQLGetTypeInfo for SQL_VARCHAR, but a column's own name is a separate question: a column declared VARCHAR(50) is not honestly reported as TEXT, so the function still answers "" for SQL_VARCHAR. Comment only.
513724e changed the order SQLGetTypeInfo reports for SQL_VARCHAR (TEXT now before VARCHAR), which an application can observe, but landed without a changelog entry. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Moves the temporary pin from 23f055e (the preferred SQLGetTypeInfo row) to the head of core's fix/review-feedback branch, the same commit the Trino driver pins. The later core commits add the character and exact numeric -> SQL_C_INTERVAL_* conversions and 22015 for oversized interval fields; none needs SQLite changes. Still temporary until a core release is tagged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Replaces the temporary commit pin with the released tag. v0.1.1 is the squash-merged core work this branch was tested against (53e5a89 plus the version bump and changelog), so the dependency's code is unchanged; the lockfile records core 0.1.1 at tag v0.1.1 (4f5e802). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
What this changes
stackable-odbc-core now orders
SQLGetTypeInforows that share aDATA_TYPEby a driver-marked preferred row beforeTYPE_NAME(see the core PR). SQLite's only sharedDATA_TYPEisSQL_VARCHAR(TEXTandVARCHAR); this marksTEXT, SQLite's own storage class, as preferred, so an application taking the first row as itsCASTtarget getsTEXT.sqlite_bare_type_namestill answers""for a column declaredVARCHAR(50): a column's own name is aseparate question from the type-info ranking (comment updated).
Core is pinned to
23f055eby a TEMPORARYrev; switch bothCargo.tomlentries to the core release tag beforemerging. That release also contains the character →
SQL_C_INTERVAL_*conversion, which affects SQLite textcolumns read as interval C types (previously
07006).Spec basis
SQLGetTypeInfo: "ordered by DATA_TYPE and then by how closely the data type maps to the corresponding ODBC SQL data
type" — https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgettypeinfo-function
Checklist
pre-commit run --all-filespasses (16/16, 2026-10-09, with the core pin53e5a89).CHANGELOG.mdhas a "Changed" entry under## [Unreleased]for the newSQLGetTypeInfoorder.every_shared_data_type_has_one_preferred_row(unit) andget_type_info_leads_sql_varchar_with_text(FFI).
Notes for the reviewer
23f055e); the later core commits on that branch need no SQLite change, but thepin should move to the release tag together with the Trino driver's.
Update 2026-10-09
151ff5edocs:CHANGELOG.mdentry for the preferredTEXTrow.23f055e→53e5a89, the same core commit as the Trino driver. It brings thelater core changes (character and exact numeric →
SQL_C_INTERVAL_*,22015for oversized interval fields); noneneeds SQLite code changes. With the new pin:
cargo test --locked298 passed,pre-commit run --all-files16/16.v0.1.1(same code as53e5a89). Re-verified: 298 passed, pre-commit 16/16.🤖 Generated with Claude Code