Skip to content

v0.1 Columnstore DDL (USING columnstore)

Creating and dropping USING columnstore tables in pg_mooncake v0.1, supported data types, constraints, and default_table_access_method.
Legacy pg_mooncake v0.1 Archive (Delta Lake Engine)

This page documents pg_mooncake v0.1, which used direct CREATE TABLE ... USING columnstore DDL and Delta Lake storage. Starting in v0.2 and PGSTY’s v0.3.0 release, pg_mooncake uses moonlink real-time columnstore mirrors (CALL mooncake.create_table + USING mooncake) and Apache Iceberg v2. For current documentation, see Introduction and v0.1 vs v0.2 & v0.3.

Create Columnstore Table (v0.1)

In v0.1, columnstore tables were created directly with the USING columnstore clause:

CREATE TABLE users_columnstore (
    id INT,
    name TEXT,
    created_at TIMESTAMP
) USING columnstore;

-- Or via CREATE TABLE ... AS SELECT
CREATE TABLE users_columnstore USING columnstore AS
    SELECT * FROM users_rowstore;

Drop Columnstore Table

DROP TABLE users_columnstore;

Supported Features & Limitations in v0.1

  • Supported: INSERT, UPDATE, DELETE, ACID transactions, NOT NULL constraints, default values, and joins with heap tables.
  • Unsupported Data Types in v0.1: ENUM, uhugeint, JSONB (partial), and complex arrays.
  • Unsupported Constraints in v0.1: Primary keys, foreign keys, unique constraints, indexes, and partitioned tables (ALTER TABLE schema changes required recreating the table).

Setting columnstore as Default Table Access Method (v0.1)

SET default_table_access_method = 'columnstore';