jackc / pgx

PostgreSQL driver and toolkit for Go
MIT License
10.83k stars 845 forks source link

Use sql.ErrNoRows as value for pgx.ErrNoRows #2115

Closed ninedraft closed 2 months ago

ninedraft commented 2 months ago

Remaking pgx.ErrNoRows as wrapper over sql.ErrNoRows

Why not just var ErrNoRows = sql.ErrNoRows? I want to preserve the original error message in case any tools (log analyzers, for example) depend on the exact string value

Corresponding issue https://github.com/jackc/pgx/issues/1931