Pivotal Knowledge Base

Follow

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

Environment

Product Version
Pivotal HDB 1.x / 2.0.x

Symptom

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); 

 

 

Comments

Powered by Zendesk