Skip to Content
SQL Syntax

pg_kalam 0.4.2-rc.3 SQL Syntax

This archive lists the primary SQL shapes for pg_kalam in 0.4.2-rc.3.

Create The Foreign Server

CREATE SERVER IF NOT EXISTS kalam_server FOREIGN DATA WRAPPER pg_kalam OPTIONS ( host '127.0.0.1', port '9188', auth_header 'Bearer <token>' );

Create A KalamDB Table From PostgreSQL

CREATE TABLE app.items ( id BIGINT PRIMARY KEY DEFAULT SNOWFLAKE_ID(), title TEXT NOT NULL ) USING kalamdb WITH ( type = 'shared' );

Query

SELECT id, title FROM app.items ORDER BY id;

Notes

  • Point port at the KalamDB RPC listener.
  • Keep the primary key as the first user column when update and delete behavior matters.
  • Use the latest pg_kalam docs when you are not pinned to this archive.
Last updated on