Repository navigation
Fix type mapping for derived tsquery parameters - #4058
Merged
Merged
Conversation
Register built-in NpgsqlTsQuery subclasses with the existing tsquery mapping and cover mapping lookup and Matches query execution. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 27b39402-3976-4bec-8473-42859b3dd0db
There was a problem hiding this comment.
🟢 Approval recommended
The localized change has focused regression coverage and no identified blocking issues; tests were not executed.
No open issues 🎉
What changed in this PR
Fixes #3041 by mapping built-in NpgsqlTsQuery subclasses to the existing PostgreSQL tsquery mapping, without changing SQL translation.
Changes:
- Registers derived tsquery types.
- Adds mapping coverage and synchronous/asynchronous
Matchesregression tests. - Leaves the separate empty-query driver issue (#886) out of scope.
| File | Description |
|---|---|
| test/EFCore.PG.Tests/Storage/NpgsqlTypeMappingSourceTest.cs | Verifies mappings for built-in tsquery types. |
| test/EFCore.PG.FunctionalTests/Query/Translations/FullTextSearchTranslationsTest.cs | Tests derived parameters, results, and generated SQL. |
| src/EFCore.PG/Storage/Internal/NpgsqlTypeMappingSource.cs | Registers subclasses with the existing mapping. |
Review effort: Balanced
This was referenced Oct 20, 2026
roji
added a commit
that referenced
this pull request
Oct 20, 2026
Backport #4058 to hotfix/9.0.5. Register the built-in NpgsqlTsQuery subclasses with the existing tsquery mapping and adapt sync/async regression coverage to the 9.0 full-text test fixture. (cherry picked from commit baa07f7) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 080d9558-9c5e-4d3a-be78-d5b52c37ea3a
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.
Capturing a variable typed as
NpgsqlTsQueryLexeme(or another tsquery subclass) in a full-text query fails because only the baseNpgsqlTsQueryCLR type has a mapping.Register the built-in subclasses with the existing
tsquerymapping, leaving the generic mapping lookup and SQL translation unchanged. Includes mapping coverage for all built-in subclasses and sync/asyncMatchesregression coverage.The separate empty-query driver failure in #886 remains out of scope.
Fixes: #3041