PostgreSQL

Connect

GreptimeDB also supports PostgreSQL server protocol! To get started, simply type the following command.

shell

  1. # 127.0.0.1 is GreptimeDB's host and 4003 is the default PostgreSQL port
  2. # use `-d` to specify the database to connect, `public` is the default database
  3. $ psql -h 127.0.0.1 -p 4003 -d public

If authentication has been set at server side, use -U to specify username and input password when prompted.

shell

  1. # replace greptime_user with your account username
  2. $ psql -h localhost -p 4003 -U greptime_user -d public

HTTP API

GreptimeDB supports sending SQL statements through HTTP API. For information on how to set up authentication, please refer to HTTP API.

Write Data

Please refer to SQL.

Query Data

Please refer to SQL.