PostgreSQL

Connect

GreptimeDB also supports PostgreSQL server protocol! To get started, simply add the -U argument to your command, followed by your username and password. Here’s an example:

shell

  1. psql -h localhost -p 4003 -U greptime_user -d public
  2. Password for user greptime_user:
  3. psql (15.2, server 0.1.1)
  4. WARNING: psql major version 15, server major version 0.1.
  5. Some psql features might not work.
  6. Type "help" for help.
  7. public=>

Note: Be sure to replace greptime_user(username) and greptime_pwd(password) with your own username and password.

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.