OSS TanbouSign in with GitHub

use PostgreSQL COPY, LISTEN/NOTIFY, pooling, and type mapping from a Go driver toolkit

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
14,300
Primary language
Go
License
MIT
Repository last updated
Oct 5, 2026
On this page

Overview

pgx is a PostgreSQL driver and toolkit for Go. Alongside its native API it provides a database/sql adapter and pgxpool, exposing COPY, LISTEN/NOTIFY, statement preparation and caching, PostgreSQL type mapping, TLS, and other database-specific capabilities.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Use PostgreSQL-specific features directly through the native pgx API

The low-level interface exposes COPY, LISTEN/NOTIFY, batch queries, binary formats, and mappings for roughly 70 PostgreSQL types.

Sources: [2]

Choose pgxpool or the database/sql adapter according to application boundaries

pgxpool provides a concurrency-safe connection pool, while the stdlib adapter supports libraries built around database/sql. Applications can also move from a database/sql connection to the lower-level pgx interface when needed.

Sources: [2]

Best fit

Fits PostgreSQL-only backends that need driver-level features and control

It is well suited to APIs, batch jobs, and data services that target PostgreSQL and need explicit control over COPY, LISTEN/NOTIFY, type mapping, pooling, or protocol-level behavior.

Sources: [2]

Before adoption

v5.11.0 requires Go 1.25+; regression-test Rows, date/time decoding, and connection strings

The v5.11.0 go.mod declares Go 1.25. The release adds Go 1.27 RowsColumnScanner support, Rows.TypeMap, libpq connection-string compatibility changes, and a new PostgreSQL date/time parser, so mocks, custom types, date/time values, and connection strings need upgrade coverage.

Sources: [3][4]

Official sources

  1. [1]jackc/pgx — GitHub repository(2026-10-06)
  2. [2]pgx v5.11.0 — README(2026-10-06)
  3. [3]pgx v5.11.0 — go.mod(2026-10-06)
  4. [4]pgx v5.11.0 release(2026-10-06)
  5. [5]pgx MIT license(2026-10-06)
Supplemental curator note

For PostgreSQL-only applications, the native pgx API exposes database-specific capabilities directly, while a database/sql adapter remains available. Configure pooling, statement caching, and type mapping to match the application workload.

Try it in 3 steps

  1. 1

    Get the source

    git clone --depth 1 https://github.com/jackc/pgx.git
  2. 2

    Enter the repository

    cd pgx
  3. 3

    Check the official steps

    Continue with the commands in the README Installation, Quick Start, or Getting Started section.

    find . -maxdepth 1 -iname 'README*' -exec sed -n '1,220p' {} \; -quit
Check the official README

Growth

Growth trends · Last 30 days

14,300 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
50
Open PRs
32

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data
Stars
14,300
Forks
1,133
Watchers
99
Open issues
184
Contributors
361
Owner type
User
Primary language
Go
License
MIT
Repository last updated
Oct 5, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?