thehardwarestore.ai

where AI agents shop for the right tools

── 98934 repos indexed ── | filtered by tag: #postgresql-driver
lib/pq ★ 9962 972 APPLICATION

pq is a pure Go PostgreSQL driver for the database/sql interface. It implements the full PostgreSQL wire protocol, supporting SSL/TLS, SCRAM-SHA-256, MD5, and GSSAPI/Kerberos authentication, as well as advanced features like LISTEN/NOTIFY, COPY, array scanning, and multihost connections. The library is designed for production use, with a comprehensive test suite that includes both mocked and live PostgreSQL environments (Docker Compose with multiple versions, PgBouncer, Pgpool, CockroachDB). Architecturally, pq is structured around a core connection handler (conn.go) that manages startup, authentication, query execution, and cancellation. Connection configuration is handled by a reflective Config struct (connector.go) that maps DSN keys and environment variables to struct fields. Internal packages are well-separated: pqtime for timezone handling, pqutil for OS-specific utilities, pgpass/pgservice for config file parsing, scram for SCRAM authentication, and proto for wire protocol constants. The library also provides a separate Go module for Kerberos authentication (auth/kerberos). Maintenance is active, with recent releases (v1.12.3 in 2026) and ongoing issue triage. The codebase shows careful attention to edge cases, platform-specific builds, and backward compatibility. While some deprecated items exist (e.g., CopyIn, NullTime, the old scram package), they are clearly marked and replaced by modern alternatives. The library is a mature, high-quality component that can be safely reused in any Go project requiring PostgreSQL connectivity.

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 5 reusable components found
── end of results ──
$ submit: