Repository navigation
[9.0] Fix reading empty multidimensional arrays - #6676
Merged
Merged
Conversation
Preserve the requested CLR array rank when PostgreSQL reports zero dimensions. Backport the functional fix from fc81e74 without the array converter cleanup, with sync and async regression coverage. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 6d345d71-8f28-4c61-a318-d28bbf7c105b
roji
force-pushed
the
roji-npgsql-9-empty-arrays
branch
from
October 18, 2026 10:55
373d824 to
067970e
Compare
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 only the empty-array rank fix from #6472 (fc81e74), without its unrelated array converter cleanup.
PostgreSQL reports zero dimensions for empty arrays. Honor the requested CLR rank when creating the empty collection, so reading
'{}'::double precision[]asdouble[,]no longer throwsInvalidCastException.Fixes #6675.
Validation on PostgreSQL 18.4 and .NET 8:
double[,]and throughValueConverter<List<Vertex>, double[,]>. The released driver reproduces the cast failure; the fixed 9.0 driver passes.hotfix/9.0.6, all 4 focused regression cases passed. The duplicate CodeQL cleanup was dropped because it is now in the release branch.