Which SQL driver to use with Postgres

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • pq

    Pure Go Postgres driver for database/sql

  • For convenience, it is better to use https://github.com/lib/pq in conjunction with https://github.com/jmoiron/sqlx, you will have all the data in json

  • go-sql-driver/mysql

    Go MySQL Driver is a MySQL driver for Go's (golang) database/sql package (by go-sql-driver)

  • I'm following Alex Edwards web dev book, he uses MySQL with go-sql-driver/mysql , i want to use Postgres, which one should I use?

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • pgx

    PostgreSQL driver and toolkit for Go

  • sqlc

    Generate type-safe code from SQL

  • I can recommend pairing it with sqlc: https://github.com/kyleconroy/sqlc

  • sqlx

    general purpose extensions to golang's database/sql

  • For convenience, it is better to use https://github.com/lib/pq in conjunction with https://github.com/jmoiron/sqlx, you will have all the data in json

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts