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

rows.Close() is not required #2170

Open
gromas opened this issue Nov 21, 2024 · 1 comment
Open

rows.Close() is not required #2170

gromas opened this issue Nov 21, 2024 · 1 comment

Comments

@gromas
Copy link

gromas commented Nov 21, 2024

pgx/rows.go

Line 471 in b9e2b20

rows.Close()

rows.Close() is not required while we have defer rows.Close() above

@felix-roehrich
Copy link
Contributor

rows.Close() may change the result of rows.Err() so this is not equivalent, rather with this an error may go unnoticed.

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

No branches or pull requests

2 participants