Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1.31 KB

File metadata and controls

58 lines (36 loc) · 1.31 KB

libpq

libpq provides PostgreSQL client libraries and command-line tools without installing the full PostgreSQL server.

It is included for projects that need psql, pg_dump, client headers, or Composer packages that compile against PostgreSQL libraries.

The tool is installed through Homebrew and declared in the project Brewfile.

Installation

It is part of the curated Homebrew environment; see Homebrew setup to install everything at once.

Install libpq directly:

brew install libpq

Verify the installation:

brew list --formula | grep -x libpq
brew --prefix libpq

Command-line tools

Homebrew installs libpq as keg-only. Use the full path when needed:

$(brew --prefix libpq)/bin/psql --version
$(brew --prefix libpq)/bin/pg_dump --version

Add it to PATH only when a project or workflow really needs global PostgreSQL client commands.

Build flags

Some native extensions may need explicit flags:

export LDFLAGS="-L$(brew --prefix libpq)/lib"
export CPPFLAGS="-I$(brew --prefix libpq)/include"

Keep those exports project-local when possible.

Rollback

Remove libpq with:

brew uninstall libpq

← Docs index · Project README