pgbash—Writing PostgreSQL-enabled Shell Scripts

pgbash is a set of PostgreSQL-related enhancements for the bash shell. pgbash turns the bash shell into a PostgreSQL client application. When you add pgbash to the bash shell, you can execute PostgreSQL commands without invoking psql (or some other PostgreSQL client application) first—instead of invoking a separate program to execute SQL commands, the pgbash shell interacts directly with the database using the libpq client library. At the time that we are writing this chapter, pgbash is distributed as a set of source-code patches for bash version 2.05a—the current version of bash is 3.0 so pgbash is a few revisions out of sync. Hopefully by the time you read this, pgbash will work with bash version ...

Get PostgreSQL, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.