# jackc/pgx

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/jackc-pgx).**

13,428 stars · 997 forks · Go · mit

## Links

- GitHub: https://github.com/jackc/pgx
- Homepage: https://pkg.go.dev/github.com/jackc/pgx/v5
- awesome-repositories: https://awesome-repositories.com/repository/jackc-pgx.md

## Description

This project is a database driver and interface for the Go programming language, specifically designed for PostgreSQL. It provides a low-level library for executing SQL queries, managing transactions, and handling data persistence within Go applications.

The driver distinguishes itself by implementing the native PostgreSQL binary wire protocol, which minimizes communication overhead and maximizes data transfer efficiency. It includes advanced connection pooling to maintain persistent database sessions and supports prepared statement caching to accelerate the execution of frequently repeated operations.

The toolkit facilitates complex data interactions by providing a query builder for constructing SQL statements and mechanisms for mapping database rows into strongly typed Go structures. These features ensure data integrity and provide a structured approach to managing relational data within backend services.

## Tags

### Data & Databases

- [PostgreSQL Connectors](https://awesome-repositories.com/f/data-databases/database-connectivity/postgresql-connectors.md) — Provides a high-performance driver for establishing native binary protocol connections to PostgreSQL databases.
- [Connection Pool Managers](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/connection-transaction-management/connection-pool-managers.md) — Maintains a persistent set of active database connections to reduce the latency cost of establishing new sessions for every request.
- [Relational Database Drivers](https://awesome-repositories.com/f/data-databases/relational-database-drivers.md) — Provides robust database interfaces and connection pools for interacting with relational data stores.
- [Backend Data Access Layers](https://awesome-repositories.com/f/data-databases/backend-data-access-layers.md) — Implements reliable data persistence layers in Go services by mapping database rows to application structures.
- [Binary Protocol Implementations](https://awesome-repositories.com/f/data-databases/postgresql-protocol-compatibility/binary-protocol-implementations.md) — Communicates directly with the database using the binary wire protocol to minimize overhead and maximize data transfer efficiency.
- [Type-Safe Database Clients](https://awesome-repositories.com/f/data-databases/type-safe-database-clients.md) — Transforms raw database result sets into strongly typed language structures using reflection or code generation.
- [Prepared Statement Engines](https://awesome-repositories.com/f/data-databases/database-drivers/prepared-statement-engines.md) — Stores pre-compiled query plans on the database server to accelerate execution times for frequently repeated operations.
- [Database Performance Optimizers](https://awesome-repositories.com/f/data-databases/database-performance-optimizers.md) — Optimizes database communication by leveraging low-level protocol features to reduce latency and improve throughput.
- [Database Transactions](https://awesome-repositories.com/f/data-databases/database-transactions.md) — Coordinates the lifecycle of database transactions by tracking state transitions and ensuring atomic execution.
- [Query Builders](https://awesome-repositories.com/f/data-databases/query-builders.md) — Provides a fluent, programmatic interface for constructing database queries while ensuring type safety and security.
- [Type-Safe Query Builders](https://awesome-repositories.com/f/data-databases/type-safe-query-builders.md) — Provides a toolkit for constructing complex SQL statements and mapping database rows to strongly typed Go structures.
- [Cursor-Based Pagination](https://awesome-repositories.com/f/data-databases/data-access-querying/data-access-abstraction/cursor-based-pagination.md) — Requests large data sets in sequential chunks by passing opaque identifiers to the server to retrieve subsequent pages.
- [Data Query Filters](https://awesome-repositories.com/f/data-databases/data-query-filters.md) — Applies boolean logic to query parameters to narrow down returned data sets based on specific field values. ([source](https://pkg.go.dev/api/))
- [Pagination](https://awesome-repositories.com/f/data-databases/pagination.md) — Requests multi-page data sets by using tokens to fetch subsequent segments of a response until all items are collected. ([source](https://pkg.go.dev/api/))
- [Schema-Aware Retrieval](https://awesome-repositories.com/f/data-databases/structured-data-schemas/schema-aware-retrieval.md) — Structures API responses based on predefined field definitions to ensure consistent access to documentation and version history.

### Programming Languages & Runtimes

- [Database Interfaces](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/language-specific-resources/systems-and-performance-languages/go-resources/database-interfaces.md) — Implements a low-level interface for executing SQL queries and managing transactions in Go applications.
- [Module Metadata Retrievers](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/module-management/module-lifecycle-managers/dynamic-module-metadata/module-metadata-retrievers.md) — Fetches high-level information about a module including its repository location and version history. ([source](https://pkg.go.dev/api/))

### Development Tools & Productivity

- [Package Metadata Querying](https://awesome-repositories.com/f/development-tools-productivity/dependency-managers/package-metadata-querying.md) — Fetches detailed information about a specific package including documentation, dependency imports, and license data. ([source](https://pkg.go.dev/api/))
