# sql: unknown driver "postgres" (forgotten import?)

- **ID:** `go/sql-driver-unknown`
- **Domain:** go
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The database driver package was not imported with a blank import, so database/sql has no registered driver.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.18 | active | — | — |
| 1.22 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   import (
  "database/sql"
  _ "github.com/lib/pq"
)
db, _ := sql.Open("postgres", dsn)
   ```
2. **** (90% success)
   ```
   Use pgx/v5/stdlib blank import when using pgx driver.
   ```

## Dead Ends

- **** — Named imports can trigger 'imported and not used' unless referenced. (60% fail)
- **** — Only changes the error message. (90% fail)
