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

5.5.3 changed the behavior of CollectRows on an empty result #1924

Closed
its-felix opened this issue Mar 3, 2024 · 0 comments
Closed

5.5.3 changed the behavior of CollectRows on an empty result #1924

its-felix opened this issue Mar 3, 2024 · 0 comments
Labels

Comments

@its-felix
Copy link
Contributor

its-felix commented Mar 3, 2024

Describe the bug
Since version 5.5.3 with the introduction of a57bb8c , the behavior of CollectRows changed. It now returns a nil slice if the passed Rows contains no rows.

To Reproduce

  • Query something that doesn't return any rows
  • Use pgx.CollectRows
  • nil slice is returned

Expected behavior
An empty slice should be returned

Actual behavior
A nil slice is returned

Version

  • Go: 1.21
  • PostgreSQL: CockroachDB 23.1.15
  • pgx: 5.5.3

Additional context
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants