PostgreSQL Wire Protocol

Kinetica has support for PostgreSQL Wire Protocol connections. PostgreSQL simple query syntax is fully supported, while PostgreSQL extended query syntax is largely supported.

Connecting

Point any client able to make use of PostgreSQL Wire Protocol at Kinetica on port 5432 to connect.

PSQL

PSQL is a PostgreSQL CLI for connecting over PostgreSQL Wire Protocol.

Connect
1
psql -h <db.host> -U <username>
SELECT
1
=> SELECT * FROM example.vehicle;
Inspect
1
2
3
4
 id |  make   |      model
----+---------+------------------
 1  | Cord    | 812
 2  | Bugatti | La Voiture Noire

Psycopg

Psycopg is a Python library for connecting over PostgreSQL Wire Protocol.

Connect
1
2
>>> import psycopg2
>>> conn = psycopg2.connect(host="<db.host>", user="<username>", password="<password>")
SELECT
1
2
3
>>> cur = conn.cursor()
>>> cur.execute("SELECT * FROM example.vehicle")
>>> cur.fetchall()
Inspect
1
[('1', 'Cord', '812'), ('2', 'Bugatti', 'La Voiture Noire')]