// the find
go-pg/pg
Golang ORM with focus on PostgreSQL features and performance
go-pg is a PostgreSQL-only ORM for Go that predates the database/sql-centric approach and implements its own wire protocol client. It handles the full stack from connection pooling to relation loading, and is explicitly in maintenance mode — the authors have moved development to Bun. For anyone starting a new project, this is a dead end.
Native support for PostgreSQL-specific types that most ORMs ignore: hstore, composite types, multidimensional arrays, and LISTEN/NOTIFY are all first-class. The COPY FROM/COPY TO support is genuinely useful for bulk operations that would choke on row-by-row inserts. CountEstimate using EXPLAIN instead of COUNT(*) is a practical performance optimization that saves you from writing it yourself. The connection pool has circuit breaker support and auto-retry on network errors baked in, not bolted on.
The README's first section is 'Maintenance mode' — that is not a soft warning, that is the authors telling you to use Bun instead. Any bug you hit that is not critical will not be fixed. The ORM uses struct tags extensively but in a way that diverges from both database/sql and sqlx conventions, so migrating away later means rewriting your model layer. Zero values are marshalled as SQL NULL by default, which will surprise anyone coming from other ORMs and cause subtle bugs with intentional zeros. No support for non-Postgres databases, which means if you ever need to run tests against SQLite or need a second DB, you are stuck.