go-pg is a PostgreSQL client and ORM for Go that emphasizes PostgreSQL-specific features and performance optimization.
The tool addresses the need for type-safe database access in Go applications targeting PostgreSQL. It provides an object-relational mapping layer that translates Go structs into SQL queries while exposing PostgreSQL capabilities like JSONB and HStore types. The approach focuses on leveraging PostgreSQL's native strengths rather than abstracting them away, allowing developers to write efficient queries that take advantage of the database's advanced features.
Developers should be aware that go-pg is in maintenance mode, with only critical issues being addressed. The project's active development has shifted to Bun, a successor that maintains similar functionality while extending support to PostgreSQL, MySQL, MariaDB, and SQLite. For new projects, particularly those requiring multi-database compatibility, Bun is the recommended choice. go-pg remains suitable for existing PostgreSQL-focused applications or teams deeply invested in its API, and it continues to receive critical bug fixes. The ecosystem includes complementary tools for migrations, model generation, sharding, and monitoring integration.
Work in the issue tracker is dominated by feature requests, help-wanted issues, and enhancement proposals, indicating that the project maintains a backlog of potential improvements despite its maintenance status.