Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sirwumpus/erlang-psql

A basic psql(1) like CLI tool to pass SQL statements to a PostgreSQL database.
https://github.com/sirwumpus/erlang-psql

cli erlang psql

Last synced: 5 days ago
JSON representation

A basic psql(1) like CLI tool to pass SQL statements to a PostgreSQL database.

Awesome Lists containing this project

README

        

Erlang psql(1) CLI
==================

```
usage: epsql [-v][-h host][-p port][-t ms][-P pass][-U user] [database]

-h host host to connect to; default "127.0.0.1"
-p port port number to connect to; default "5432"
-t ms connection timeout in milliseconds; default "5000"
-P pass user password
-U user user to connect as; default "$USER"
```

A simple `psql(1)` like CLI tool that reads standard input for SQL statements passing them on to the connected PostgreSQL server.

### Create A Database

```
$ echo "CREATE DATABASE black;" | epsql -U postgres
$ epsql -U postgres black <