[8.0] Backport regex operand parentheses fix - #3930
Merged
Merged
Conversation
Fixes #3923 (cherry picked from commit b123371) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> # Conflicts: # src/EFCore.PG/Query/Internal/NpgsqlQuerySqlGenerator.cs # test/EFCore.PG.FunctionalTests/Query/JsonDomQueryTest.cs # test/EFCore.PG.FunctionalTests/Query/JsonQueryNpgsqlTest.cs # test/EFCore.PG.FunctionalTests/Query/NorthwindFunctionsQueryNpgsqlTest.cs
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.
Backports #3927 (b123371) to
hotfix/8.0.12, addressing #3923 for EFCore.PG 8.0.8.0 is affected: a JSON-derived regex pattern can concatenate the regex option prefix with the JSON document before extracting its property, producing invalid SQL behavior and PostgreSQL error
22P02.NOT (... ~ ...)/NOT (... ~* ...)behavior; do not introduce the newer negation optimization. EF Core 8.0.11 already handlesJsonScalarExpression, so theToJsonregression needs no additional provider changes.Verification (.NET SDK 8.0.425, PostgreSQL 18.4): functional test project builds with zero warnings/errors; all 40 focused regex tests pass. Related
JsonDomQueryTest,JsonPocoQueryTest,JsonQueryNpgsqlTest,NorthwindFunctionsQueryNpgsqlTest,FunkyDataQueryNpgsqlTest,OperatorsQueryNpgsqlTest,ArrayArrayQueryTest,ArrayListQueryTest, andFullTextSearchDbFunctionsNpgsqlTestsuites pass: 1,616 passed, 17 skipped, zero failures.No dependency or SDK manifest changes.