Initialize data directory.
$ mkdir postgresql
$ initdb -D ./postgresql/
Start the server
$ pg_ctl -D ./postgresql/ -l postgresql.log start
Create database named example:
$ createdb example
REPL:
$ psql example
Quit REPL:
example=# \q
using LibPQ, DataStreams, NamedTuples
conn = LibPQ.Connection("dbname=example")
result = execute(conn, "SELECT * FROM TB_TEST")
data = Data.stream!(result, NamedTuple)