pkg.sopackage field notes

brew / rank 149

Install libpq with Homebrew

Postgres C API library. Version 18.4 via Homebrew; verified from local package data.

install

Additional install commands

macOS

Homebrewverified ยท 100%
brew install libpq

provider-native install command

overview

Package summary

Postgres C API library

Commands and aliases

  • clusterdb
  • createdb
  • createuser
  • dropdb
  • dropuser
  • ecpg
  • initdb
  • pg_amcheck
  • pg_archivecleanup
  • pg_basebackup
  • pg_checksums
  • pg_combinebackup
  • pg_config
  • pg_controldata
  • pg_createsubscriber
  • pg_ctl
  • pg_dump
  • pg_dumpall
  • pg_isready
  • pg_receivewal
  • pg_recvlogical
  • pg_resetwal
  • pg_restore
  • pg_rewind
  • pg_test_fsync
  • pg_test_timing
  • pg_upgrade
  • pg_verifybackup
  • pg_waldump
  • pg_walsummary
  • pgbench
  • psql

history

Project history and usage

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.

Project history

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.

Adoption history

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.

How it is used

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.

Why package nerds care

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.

Timeline

  • 1986: Implementation of the Berkeley POSTGRES project began at the University of California at Berkeley.
  • 1994: Postgres95 added an SQL interpreter and `psql`, replacing POSTQUEL and the older monitor program.
  • 1996: The project adopted the PostgreSQL name and reset version numbering to 6.0.
  • 2023-09-14: PostgreSQL 16 was released, including libpq load-balancing support among its client-side changes.
  • 2024-09-26: PostgreSQL 17 was released with new client and administration utilities including `pg_createsubscriber` and `pg_combinebackup`.

Related projects

  • PostgreSQL server, `psql`, ECPG, PostgreSQL client utilities, language drivers that use libpq, and Homebrew's versioned `libpq@16` and `libpq@17` formulae are the closest related projects.

security posture

No protected-tool coverage found yet

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.

Install behavior

  • No Homebrew bottle metadata was recorded.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

Configuration and credential file locations

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.

Configuration files

Config paths the tool may read or write during local use.

Unix
psqlrc in the directory reported by pg_config --sysconfdir~/.psqlrcpg_service.conf in the directory reported by pg_config --sysconfdir~/.pg_service.conf
Windows
%APPDATA%\postgresql\psqlrc.conf%APPDATA%\postgresql\.pg_service.conf

Credential files

Credential-bearing paths to review before unattended agent runs.

Unix
~/.pgpass
Windows
%APPDATA%\postgresql\pgpass.conf

executables

Installed executables

CommandKindExposureNote
clusterdbexecutableindexed executableDiscovered from the local executable index.
createdbexecutableindexed executableDiscovered from the local executable index.
createuserexecutableindexed executableDiscovered from the local executable index.
dropdbexecutableindexed executableDiscovered from the local executable index.
dropuserexecutableindexed executableDiscovered from the local executable index.
ecpgexecutableindexed executableDiscovered from the local executable index.
initdbexecutableindexed executableDiscovered from the local executable index.
pg_amcheckexecutableindexed executableDiscovered from the local executable index.
pg_archivecleanupexecutableindexed executableDiscovered from the local executable index.
pg_basebackupexecutableindexed executableDiscovered from the local executable index.
pg_checksumsexecutableindexed executableDiscovered from the local executable index.
pg_combinebackupexecutableindexed executableDiscovered from the local executable index.
pg_configexecutableindexed executableDiscovered from the local executable index.
pg_controldataexecutableindexed executableDiscovered from the local executable index.
pg_createsubscriberexecutableindexed executableDiscovered from the local executable index.
pg_ctlexecutableindexed executableDiscovered from the local executable index.
pg_dumpexecutableindexed executableDiscovered from the local executable index.
pg_dumpallexecutableindexed executableDiscovered from the local executable index.
pg_isreadyexecutableindexed executableDiscovered from the local executable index.
pg_receivewalexecutableindexed executableDiscovered from the local executable index.
pg_recvlogicalexecutableindexed executableDiscovered from the local executable index.
pg_resetwalexecutableindexed executableDiscovered from the local executable index.
pg_restoreexecutableindexed executableDiscovered from the local executable index.
pg_rewindexecutableindexed executableDiscovered from the local executable index.
pg_test_fsyncexecutableindexed executableDiscovered from the local executable index.
pg_test_timingexecutableindexed executableDiscovered from the local executable index.
pg_upgradeexecutableindexed executableDiscovered from the local executable index.
pg_verifybackupexecutableindexed executableDiscovered from the local executable index.
pg_waldumpexecutableindexed executableDiscovered from the local executable index.
pg_walsummaryexecutableindexed executableDiscovered from the local executable index.
pgbenchexecutableindexed executableDiscovered from the local executable index.
psqlexecutableindexed executableDiscovered from the local executable index.
reindexdbexecutableindexed executableDiscovered from the local executable index.
vacuumdbexecutableindexed executableDiscovered from the local executable index.

freshness

Version and 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.

page generated2026-08-03
manager version18.4
manager updated
local dataunknown
upstreamnot available
latest detectednot detected
  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:libpq
Version18.4
Package managerHomebrew
Homepagehttps://www.postgresql.org/docs/current/libpq.html
Bottlenot recorded
Servicenone declared

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • Nucleus package database
  • curated configuration and credential file locations
  • curated package history
  • pkgdb category and tag curation