libpq

PostgreSQL client library and utilities for C/C++ applications

brewmacoslinux
Try with needOr install directly
Source

About

Postgres C API library

Commands

psqlpg_dumppg_restorepg_isreadycreatedbdropdbcreateuserdropuser

Examples

Connect to a PostgreSQL database and run interactive queries$ psql -h localhost -U username -d database_name
Dump a PostgreSQL database to a SQL file for backup$ pg_dump -h localhost -U username database_name > backup.sql
Check if a PostgreSQL server is accepting connections$ pg_isready -h localhost -p 5432