Pgbash is a BASH shell which includes the functionality of accessing the database for PostgreSQL. It is possible to execute SQL by making a shell script in the batch processing, and execute SQL directly in the interactive environment.
The pgbashproject is a PostgreSQL Community project that is a part of the pgFoundry.
The pgFoundry page for the project is at http://pgfoundry.org/projects/pgbash, where you can find downloads, documentation, bug reports, mailing lists, and a whole lot more.