macOS
brew install libpqlocal Homebrew formula metadata
brew
Postgres C API library. Version 18.4 via Homebrew; verified 2026-06-28.
install
brew install libpqlocal Homebrew formula metadata
sudo apk add libpqAlpine Linux edge package indexes · libpq · source: dl-cdn.alpinelinux.org
sudo dnf install libpqFedora Rawhide package metadata · libpq · source: dl.fedoraproject.org
sudo apt install pg-checksums-docDebian stable package indexes · pg-checksums-doc · source: deb.debian.org
nix profile install nixpkgs#pg_checksumsnixpkgs package indexes · pkgs/by-name/pg/pg_checksums/package.nix · source: api.github.com
overview
Postgres C API library
history
libpq is PostgreSQL's C client library: the small, stable-looking surface that lets C programs connect to PostgreSQL servers, submit queries, and read results. It also underlies several other PostgreSQL client interfaces, so packaging it separately gives developers the client headers, shared library, and familiar tools without requiring a Homebrew PostgreSQL server installation.
PostgreSQL descends from the Berkeley POSTGRES project, whose implementation began in 1986. The Postgres95 transition in 1994 replaced POSTQUEL with SQL and introduced `psql`; the PostgreSQL name arrived in 1996 to connect the POSTGRES heritage with SQL support.
The PostgreSQL manual notes that the `libpq` name came from PostQUEL. As PostgreSQL matured into a long-lived open source database, libpq became the canonical C API for client programs and a shared substrate for other language bindings and command-line clients.
libpq's adoption follows PostgreSQL's adoption: applications, drivers, migration tools, backup tools, and admin scripts need a PostgreSQL client layer even when the database server runs elsewhere. PostgreSQL's 2023 project announcement described the system as benefiting from more than 25 years of open source development and a global community of users, contributors, companies, and organizations.
Homebrew's `libpq` formula packages the client side as a keg-only formula. That matters on developer workstations because it avoids colliding with a full `postgresql` formula while still making `psql`, `pg_dump`, `pg_restore`, `pg_config`, and the C library available to builds and scripts.
Typical package-manager use is installing libpq so native extensions, database drivers, and command-line workflows can compile or run against PostgreSQL. Developers use `pg_config` to find build flags, `psql` for interactive sessions, and the dump/restore utilities for movement between PostgreSQL instances.
libpq is package-nerd significant because it is a dependency edge disguised as a database client. Many packages need PostgreSQL client headers and link libraries, but users often do not want a local database server; a separate formula keeps that dependency smaller and less invasive.
It also exposes PostgreSQL's major-version reality to package managers: client utilities can speak across versions, but dump, restore, upgrade, and extension-building workflows often care about exact major lines. That is why versioned formulae such as `libpq@16` and `libpq@17` are useful beside the unversioned formula.
security posture
No matching local secret-handling manifest was found for libpq. Nucleus package metadata is still published here so future coverage has a stable package URL.
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
psqlrc in the directory reported by pg_config --sysconfdir~/.psqlrcpg_service.conf in the directory reported by pg_config --sysconfdir~/.pg_service.conf%APPDATA%\postgresql\psqlrc.conf%APPDATA%\postgresql\.pg_service.confCredential-bearing paths to review before unattended agent runs.
~/.pgpass%APPDATA%\postgresql\pgpass.confexecutables
| Command | Kind | Exposure | Note |
|---|---|---|---|
clusterdb | cli | global executable | |
createdb | cli | global executable | |
createuser | cli | global executable | |
dropdb | cli | global executable | |
dropuser | cli | global executable | |
ecpg | cli | global executable | |
initdb | cli | global executable | |
pg_amcheck | cli | global executable | |
pg_archivecleanup | cli | global executable | |
pg_basebackup | cli | global executable | |
pg_checksums | cli | global executable | |
pg_combinebackup | cli | global executable | |
pg_config | cli | global executable | |
pg_controldata | cli | global executable | |
pg_createsubscriber | cli | global executable | |
pg_ctl | cli | global executable | |
pg_dump | cli | global executable | |
pg_dumpall | cli | global executable | |
pg_isready | cli | global executable | |
pg_receivewal | cli | global executable | |
pg_recvlogical | cli | global executable | |
pg_resetwal | cli | global executable | |
pg_restore | cli | global executable | |
pg_rewind | cli | global executable | |
pg_test_fsync | cli | global executable | |
pg_test_timing | cli | global executable | |
pg_upgrade | cli | global executable | |
pg_verifybackup | cli | global executable | |
pg_waldump | cli | global executable | |
pg_walsummary | cli | global executable | |
pgbench | cli | global executable | |
psql | cli | global executable | |
reindexdb | cli | global executable | |
vacuumdb | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://www.postgresql.org/docs/current/libpq.html
install metadata
| Package key | brew:libpq |
|---|---|
| Version | 18.4 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/libpq |
| Homepage | https://www.postgresql.org/docs/current/libpq.html |
| Repository | https://git.postgresql.org/git/postgresql.git |
| Upstream docs | https://www.postgresql.org/docs/current/libpq.html |
| License | PostgreSQL |
| Source archive | https://ftp.postgresql.org/pub/source/v18.4/postgresql-18.4.tar.bz2 |
| Last updated | 2026-06-28T05:00:52Z |
| Pulse | updated |
| Dependencies | icu4c@78, krb5, openssl@3, readline |
| Build dependencies | docbook, docbook-xsl, pkgconf |
| Uses from macOS | curl |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | libpq |
| Aliases |
|
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | yes |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
libpq 18.4-r0
PostgreSQL client library
sudo apk add libpqlibpq 18.4-1.fc45
PostgreSQL client library
sudo dnf install libpqlibpq-devel 18.4-1.fc45
Development files for building PostgreSQL client tools
sudo dnf install libpq-develpg-checksums-doc 1.2-2
Activate/deactivate/verify PostgreSQL data checksums (Documentation)
https://github.com/credativ/pg_checksums
sudo apt install pg-checksums-docpostgresql-17-pg-checksums 1.2-2
Activate/deactivate/verify PostgreSQL data checksums
https://github.com/credativ/pg_checksums
sudo apt install postgresql-17-pg-checksumspg_checksums
nix profile install nixpkgs#pg_checksumspg-checksums-doc 1.1-6
Activate/deactivate/verify PostgreSQL data checksums (Documentation)
https://github.com/credativ/pg_checksums
sudo apt install pg-checksums-docpostgresql-16-pg-checksums 1.1-6
Activate/deactivate/verify PostgreSQL data checksums
https://github.com/credativ/pg_checksums
sudo apt install postgresql-16-pg-checksumssource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.