Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix behavior of CollectRows to return empty slice if Rows are empty #1925

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

its-felix
Copy link
Contributor

@jackc jackc merged commit c1b0a01 into jackc:master Mar 3, 2024
14 checks passed
@erezrokah
Copy link

erezrokah commented Mar 4, 2024

Thanks for the PR @its-felix and the quick merge @jackc. Will a new tag/release created with this fix?

The change in behavior is especially impactful when JSON serializing the response (like in a REST API backend server) since then instead of an empty array you'd get a null value which is unexpected (somehow related to golang/go#37711)

@its-felix
Copy link
Contributor Author

That's also the exact reason why it caught my eye, leading to this PR and why I rolled back to 5.5.2 in my project.

@jackc
Copy link
Owner

jackc commented Mar 4, 2024

v5.5.4 was just released.

its-felix added a commit to its-felix/pgx that referenced this pull request Mar 5, 2024
its-felix added a commit to its-felix/pgx that referenced this pull request Mar 5, 2024
jackc pushed a commit that referenced this pull request Mar 7, 2024
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.

3 participants