Closed
Description
Describe the bug
Query or QueryRow method does not return ErrNoRows error when using SQL left joins another table with where filter
To Reproduce
Sample SQL to reproduce the bug:
query := SELECT f.id, f.name FROM foo f LEFT JOIN bar b ON f.id = b.foo_id WHERE f.id = 123
Expected behavior
Query or QueryRow returns ErrNoRows error when no record is found
Actual behavior
Query or QueryRow returns no error when no record is found
Version
- Go: 1.22.3
- PostgreSQL: 12.2
- pgx: v5.7.2