-
Notifications
You must be signed in to change notification settings - Fork 623
Terminal
Peloton's interactive terminal allows you to interactively enter, edit, and execute SQL commands. It is very similar to the psql
program in Postgres.
Launch the peloton binary (which should be accessible on your PATH)
peloton
The default port number is 15721. You could also launch Peloton on a custom port as follows
peloton -port 5432
PSQL is the standard PostgreSQL client. Peloton has been tested to work with psql version 9.5.4.
To connect PSQL to Peloton running on your localhost as the database is "default_database", run
psql -U postgres -h localhost -p 15721 default_database
The default database is the only database when Peloton initially boots up.
If Peloton is running on non-default host or port or database, run
psql -h <peloton_host> -p <peloton_port> <database_name>
The latest versions of PSQL clients use SSL encryption to communicate with Postgres servers. It is necessary to disable this feature as Peloton doesn't support SSL-encypted communication yet.
Once PSQL connects successfully you will observe this familiar SQL client interface.
psql (9.5devel)
Type "help" for help.
postgres=# create table foo(id integer, year integer);
create table foo(id integer, year integer) 0
postgres=# insert into foo values(5, 400);
insert into foo values(5, 400) 1
postgres=# select * from foo;
id | year
----+------
5 | 400
(1 row)
psql (9.5devel)
Type "help" for help.
postgres=# \i ../scripts/testing/join/nested_loop_join.sql