Pivotal HDB Query Error: "Cannot Support Create Index Statement Yet"
search cancel

Pivotal HDB Query Error: "Cannot Support Create Index Statement Yet"

book

Article ID: 295027

calendar_today

Updated On:

Products

Services Suite

Issue/Introduction

Creating a table with a primary key in Pivotal HDB/HAWQ fails with the following error:

gpadmin=# CREATE TABLE test_table (id integer PRIMARY KEY, name character) DISTRIBUTED BY (id);
ERROR: Cannot support create index statement yet
gpadmin=#

Cause

A primary key requires an index and indexes are not yet supported in Pivotal HDB, so primary keys cannot be added to Pivotal HDB tables.

Resolution

The table should be created without a primary key constraint:

gpadmin=# CREATE TABLE test_table (id integer, name character) DISTRIBUTED BY (id);