Automic VaultAutomic Vault

brew

使用 Homebrew, apk, dnf, apt, Nix 安装 libpq

查看 libpq 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install libpq

local Homebrew formula metadata

Linux

Alpine Linux apk已验证 · 92%
sudo apk add libpq

Alpine Linux edge package indexes · libpq · 来源: dl-cdn.alpinelinux.org

Fedora dnf已验证 · 92%
sudo dnf install libpq

Fedora Rawhide package metadata · libpq · 来源: dl.fedoraproject.org

Debian apt已验证 · 92%
sudo apt install pg-checksums-doc

Debian stable package indexes · pg-checksums-doc · 来源: deb.debian.org

Nix已验证 · 92%
nix profile install nixpkgs#pg_checksums

nixpkgs package indexes · pkgs/by-name/pg/pg_checksums/package.nix · 来源: api.github.com

概览

软件包摘要

Postgres C API library

命令和别名

  • 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

历史

项目历史与用法

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.

时间线

  • 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.

安全态势

尚未找到受保护工具覆盖

没有找到 libpq 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布,以便未来覆盖拥有稳定的软件包 URL。

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 安装时包含 4 个运行时依赖。
  • 构建元数据列出 3 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

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

可执行文件

已安装的可执行文件

命令类型暴露范围备注
clusterdbcli全局可执行文件
createdbcli全局可执行文件
createusercli全局可执行文件
dropdbcli全局可执行文件
dropusercli全局可执行文件
ecpgcli全局可执行文件
initdbcli全局可执行文件
pg_amcheckcli全局可执行文件
pg_archivecleanupcli全局可执行文件
pg_basebackupcli全局可执行文件
pg_checksumscli全局可执行文件
pg_combinebackupcli全局可执行文件
pg_configcli全局可执行文件
pg_controldatacli全局可执行文件
pg_createsubscribercli全局可执行文件
pg_ctlcli全局可执行文件
pg_dumpcli全局可执行文件
pg_dumpallcli全局可执行文件
pg_isreadycli全局可执行文件
pg_receivewalcli全局可执行文件
pg_recvlogicalcli全局可执行文件
pg_resetwalcli全局可执行文件
pg_restorecli全局可执行文件
pg_rewindcli全局可执行文件
pg_test_fsynccli全局可执行文件
pg_test_timingcli全局可执行文件
pg_upgradecli全局可执行文件
pg_verifybackupcli全局可执行文件
pg_waldumpcli全局可执行文件
pg_walsummarycli全局可执行文件
pgbenchcli全局可执行文件
psqlcli全局可执行文件
reindexdbcli全局可执行文件
vacuumdbcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-10
管理器版本18.4
管理器更新时间2026-06-28
本地数据OK
上游not checked
检测到的最新版本未检测到

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
Pulseupdated
依赖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 DatabaseHomebrew formula API
Taphomebrew/core
Full Namelibpq
Aliases
  • libpq@18
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyyes
URL Keys
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

apk95%

libpq 18.4-r0

PostgreSQL client library

https://www.postgresql.org/

sudo apk add libpq
  • License: PostgreSQL
  • Architecture: x86_64
  • Source Package: postgresql18
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Libpq
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: libpq from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
dnf95%

libpq 18.4-1.fc45

PostgreSQL client library

http://www.postgresql.org/

sudo dnf install libpq
  • License: PostgreSQL
  • Category: Unspecified
  • Architecture: i686
  • Source Package: libpq
  • 6 依赖
  • 3 提供
  • normalized package name match
  • 匹配方式:Libpq
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: libpq from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
dnf95%

libpq-devel 18.4-1.fc45

Development files for building PostgreSQL client tools

http://www.postgresql.org/

sudo dnf install libpq-devel
  • License: PostgreSQL
  • Category: Unspecified
  • Architecture: i686
  • Source Package: libpq
  • 6 依赖
  • 3 提供
  • normalized package name match
  • 匹配方式:Libpq
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: libpq-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
Debian apt92%

pg-checksums-doc 1.2-2

Activate/deactivate/verify PostgreSQL data checksums (Documentation)

https://github.com/credativ/pg_checksums

sudo apt install pg-checksums-doc
  • Section: database
  • Architecture: all
  • Source Package: pg-checksums
  • installed executable or alias match
  • 匹配方式:Pg Checksums
Debian stable package indexes · deb.debian.org · Debian stable package indexes: pg-checksums-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt92%

postgresql-17-pg-checksums 1.2-2

Activate/deactivate/verify PostgreSQL data checksums

https://github.com/credativ/pg_checksums

sudo apt install postgresql-17-pg-checksums
  • Section: database
  • Architecture: amd64
  • Source Package: pg-checksums
  • 2 依赖
  • 1 可选依赖
  • installed executable or alias match
  • 匹配方式:Pg Checksums
Debian stable package indexes · deb.debian.org · Debian stable package indexes: postgresql-17-pg-checksums from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix92%

pg_checksums

nix profile install nixpkgs#pg_checksums
  • installed executable or alias match
  • 匹配方式:Pg Checksums
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/pg/pg_checksums/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt92%

pg-checksums-doc 1.1-6

Activate/deactivate/verify PostgreSQL data checksums (Documentation)

https://github.com/credativ/pg_checksums

sudo apt install pg-checksums-doc
  • Section: universe/doc
  • Architecture: all
  • Source Package: pg-checksums
  • installed executable or alias match
  • 匹配方式:Pg Checksums
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: pg-checksums-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
Ubuntu apt92%

postgresql-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
  • Section: universe/database
  • Architecture: amd64
  • Source Package: pg-checksums
  • 2 依赖
  • 1 可选依赖
  • installed executable or alias match
  • 匹配方式:Pg Checksums
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: postgresql-16-pg-checksums from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment