zsh-pg 
A ZSH plugin with utility functions to work with PostgreSQL.
Commands
pg create <name>: create a databasepg drop <name>: drop a databasepg ls: list databasespg cp <origin> <target>: make a copy of a databasepg mv <origin> <target>: rename a databasepg kill-connections <database>: kill all connections to a databasepg dump-table <database> <table> > file.sql: dump table data (in form of inserts) into thefile.sql
Install
Using antibody:
$ antibody bundle caarlos0/zsh-pg
Using antigen:
$ antigen bundle caarlos0/zsh-pg