$ createdb testdb
$ wget https://github.com/cayleygraph/cayley/releases/download/v0.7.2/cayley_0.7.2_darwin_amd64.tar.gz
$ tar zxvf cayley_0.7.2_darwin_amd64.tar.gz
$ cat >cayley.cfg.json
{
"store": {
"backend": "postgres",
"address": "postgres://postgres@localhost:5432/testdb?sslmode=disable",
"read_only": false
}
}
<CMD-D>
$ ./cayley_0.7.2_darwin_amd64/cayley init --config=./cayley.cfg.json
I0421 10:10:31.656097 26828 cayley.go:63] Cayley version: 0.7.2 (3091e673e8d9a945a71e286ca90f5e478e3ac503)
I0421 10:10:31.656249 26828 cayley.go:76] using config file: ./cayley.cfg.json
I0421 10:10:31.656406 26828 database.go:187] using backend "postgres" (postgres://postgres@localhost:5432/testdb?sslmode=disable)
$ wget https://raw.githubusercontent.com/oren/cayley-postgres/master/canada.nq
$ ./cayley_0.7.2_darwin_amd64/cayley load --config=./cayley.cfg.json --load=./canada.nq
I0421 10:14:12.980555 27154 cayley.go:63] Cayley version: 0.7.2 (3091e673e8d9a945a71e286ca90f5e478e3ac503)
I0421 10:14:12.980705 27154 cayley.go:76] using config file: ./cayley.cfg.json
I0421 10:14:12.980916 27154 database.go:187] using backend "postgres" (postgres://postgres@localhost:5432/testdb?sslmode=disable)
$ ./cayley_0.7.2_darwin_amd64/cayley repl --config=./cayley.cfg.json
I0421 10:14:58.259904 27217 cayley.go:63] Cayley version: 0.7.2 (3091e673e8d9a945a71e286ca90f5e478e3ac503)
I0421 10:14:58.260072 27217 cayley.go:76] using config file: ./cayley.cfg.json
I0421 10:14:58.260249 27217 database.go:187] using backend "postgres" (postgres://postgres@localhost:5432/testdb?sslmode=disable)
creating new history file: ".cayley_history"
cayley> g.V("person:justin").Out("in love with").All()
****
id : person:sophie
-----------
1 Result
Elapsed time: 5.667 ms
cayley>
More queries can be found at https://github.com/oren/cayley-postgres (but the setup instructions are dated).