Skip to content

[9.0] Preserve array element converters with explicit column types - #4014

Merged
roji merged 2 commits into
hotfix/9.0.5from
roji-array-converter-backport-9-0
Oct 18, 2026
Merged

roji merged 2 commits into
hotfix/9.0.5from
roji-array-converter-backport-9-0

Conversation

@roji

@roji roji commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Backport of #4007 to hotfix/9.0.5.

Preserves configured array element converters while retaining explicit array column-type precedence and the expanded rationale comment. Includes the original functional and type-mapping regression coverage; the Contains SQL assertion is adapted to 9.0's @> array-containment translation instead of main's ANY translation.

Cherry-picked from 9357929.

Includes the CI correction from the merged 10.0 backport (#4011, commit 842f9cd): converter composition retains the JSON reader/writer selected for the explicit element store type instead of restoring the inferred writer. Two regression cases verify timestamp array JSON serialization with and without an element converter; both reproduced the CI exception before the correction.

Validated with the pinned .NET SDK 9.0.312 and PostgreSQL 18.4:

  • NpgsqlTypeMappingSourceTest: 106 passed.
  • Combined JSON query/update, ad-hoc JSON query, and value-converter suites: 838 passed, 9 existing skips.

No SDK or dependency configuration changes.

Fixes #3636

Backport of #4007. Preserve explicit array column-type precedence and adapt the Contains SQL assertion to the 9.0 containment translation.

Fixes #3636

(cherry picked from commit 9357929)

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: bda9aa2e-f002-4257-9792-18a68ee0b9f2
Port the correction from the 10.0 backport: compose converters over the JSON reader/writer selected for the explicit element store type instead of restoring the inferred writer. Cover timestamp array JSON serialization with and without an element converter.

(cherry picked from commit 842f9cd)

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: bda9aa2e-f002-4257-9792-18a68ee0b9f2
@roji
roji merged commit fbe32cd into hotfix/9.0.5 Oct 18, 2026
10 checks passed
@roji
roji deleted the roji-array-converter-backport-9-0 branch October 18, 2026 16:04
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.

ElementType().HasConversion() ignored when calling HasColumnType on PrimitiveCollection

1 participant