macOS
brew install libpqlocal Homebrew formula metadata
安装
brew install libpqlocal Homebrew formula metadata
sudo apk add libpqAlpine Linux edge package indexes · libpq · 来源: dl-cdn.alpinelinux.org
sudo dnf install libpqFedora Rawhide package metadata · libpq · 来源: dl.fedoraproject.org
sudo apt install pg-checksums-docDebian stable package indexes · pg-checksums-doc · 来源: deb.debian.org
nix profile install nixpkgs#pg_checksumsnixpkgs package indexes · pkgs/by-name/pg/pg_checksums/package.nix · 来源: api.github.com
概览
Postgres C API library
历史
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.
安全态势
没有找到 libpq 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布,以便未来覆盖拥有稳定的软件包 URL。
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
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.conf可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
clusterdb | cli | 全局可执行文件 | |
createdb | cli | 全局可执行文件 | |
createuser | cli | 全局可执行文件 | |
dropdb | cli | 全局可执行文件 | |
dropuser | cli | 全局可执行文件 | |
ecpg | cli | 全局可执行文件 | |
initdb | cli | 全局可执行文件 | |
pg_amcheck | cli | 全局可执行文件 | |
pg_archivecleanup | cli | 全局可执行文件 | |
pg_basebackup | cli | 全局可执行文件 | |
pg_checksums | cli | 全局可执行文件 | |
pg_combinebackup | cli | 全局可执行文件 | |
pg_config | cli | 全局可执行文件 | |
pg_controldata | cli | 全局可执行文件 | |
pg_createsubscriber | cli | 全局可执行文件 | |
pg_ctl | cli | 全局可执行文件 | |
pg_dump | cli | 全局可执行文件 | |
pg_dumpall | cli | 全局可执行文件 | |
pg_isready | cli | 全局可执行文件 | |
pg_receivewal | cli | 全局可执行文件 | |
pg_recvlogical | cli | 全局可执行文件 | |
pg_resetwal | cli | 全局可执行文件 | |
pg_restore | cli | 全局可执行文件 | |
pg_rewind | cli | 全局可执行文件 | |
pg_test_fsync | cli | 全局可执行文件 | |
pg_test_timing | cli | 全局可执行文件 | |
pg_upgrade | cli | 全局可执行文件 | |
pg_verifybackup | cli | 全局可执行文件 | |
pg_waldump | cli | 全局可执行文件 | |
pg_walsummary | cli | 全局可执行文件 | |
pgbench | cli | 全局可执行文件 | |
psql | cli | 全局可执行文件 | |
reindexdb | cli | 全局可执行文件 | |
vacuumdb | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://www.postgresql.org/docs/current/libpq.html
安装元数据
| 软件包键 | brew:libpq |
|---|---|
| 版本 | 18.4 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/libpq |
| 主页 | https://www.postgresql.org/docs/current/libpq.html |
| 仓库 | https://git.postgresql.org/git/postgresql.git |
| 上游文档 | https://www.postgresql.org/docs/current/libpq.html |
| 许可证 | PostgreSQL |
| 源码归档 | https://ftp.postgresql.org/pub/source/v18.4/postgresql-18.4.tar.bz2 |
| 最后更新 | 2026-06-28T05:00:52Z |
| Pulse | updated |
| 依赖 | icu4c@78, krb5, openssl@3, readline |
| 构建依赖 | docbook, docbook-xsl, pkgconf |
| macOS 提供的库 | curl |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| 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 |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
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-checksums来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.