Skip to content

Document 10.0 array Contains breaking SQL translation change#464

Merged
roji merged 2 commits into
mainfrom
roji-add-10-0-breaking-change-note
Jul 2, 2026
Merged

Document 10.0 array Contains breaking SQL translation change#464
roji merged 2 commits into
mainfrom
roji-add-10-0-breaking-change-note

Conversation

@roji

@roji roji commented Jul 2, 2026

Copy link
Copy Markdown
Member

This updates the EFCore.PG 10.0 release notes to make the array.Contains(element) SQL translation change prominent and explicit, since it can affect query performance after upgrade.

What changed

  • Added a dedicated top breaking-change subsection for the array Contains translation change (@> to ANY).
  • Included both previous and new SQL snippets for quick comparison.
  • Added a short note on performance implications depending on index shape.
  • Documented the EF model configuration (HasIndex(...).HasMethod("gin")) to signal a GIN index and restore the previous @> translation.
  • Grouped the existing network-related bullets under a new Other breaking changes subsection.

Notes for reviewers

This is a docs-only structural/content change in conceptual/EFCore.PG/release-notes/10.0.md, focused on surfacing upgrade-impact guidance from npgsql/efcore.pg#3862 and npgsql/efcore.pg#3546.

Copilot AI review requested due to automatic review settings July 2, 2026 10:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the EFCore.PG 10.0 release notes to make the breaking SQL translation change for array.Contains(element) highly visible, including guidance on when/how to restore the previous translation based on index modeling.

Changes:

  • Added a dedicated breaking-change subsection describing the default translation shift from @> to ANY, with old/new SQL examples.
  • Documented the performance implication tradeoff and the GIN index modeling snippet (HasMethod("gin")) to revert to @> when appropriate.
  • Grouped existing network-related breaking changes under an Other breaking changes subsection.
Show a summary per file
File Description
conceptual/EFCore.PG/release-notes/10.0.md Reorganized and expanded 10.0 breaking-change documentation to prominently cover the array Contains translation change and mitigation guidance.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment thread conceptual/EFCore.PG/release-notes/10.0.md Outdated
roji and others added 2 commits July 2, 2026 12:47
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@roji roji force-pushed the roji-add-10-0-breaking-change-note branch from 0c8a743 to 571cb6e Compare July 2, 2026 10:47
Copilot AI review requested due to automatic review settings July 2, 2026 10:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Low


### Array `Contains` translation now defaults to `ANY`

Translation for array `Contains` was changed in 10.0: `arrayColumn.Contains(element)` now defaults to `element = ANY(arrayColumn)` (instead of `arrayColumn @> ARRAY[element]`). This can impact performance depending on your indexes: `@>` can be much faster with a GIN index over the array column, while `ANY` can be better when that GIN index is missing.

To tell EF that a GIN index exists and revert to the previous `@>` translation, model that index:

```csharp
@roji roji merged commit 9696d96 into main Jul 2, 2026
3 checks passed
@roji roji deleted the roji-add-10-0-breaking-change-note branch July 2, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants