Pivotal Knowledge Base

Follow

Greenplum Error: "Failed to Create Array for Composite Type"

Environment

 Product  Version
 Pivotal Greenplum  4.3.x
 OS  All Supported OS

Symptom

When creating a table with an array, the command would fail and generate the following error:

testDB=# CREATE TYPE mytype as (name text, price int);
CREATE TYPE
testDB=# create table test1 (col1 mytype);
NOTICE: Table doesn't have 'distributed by' clause, and no column type is suitable for a distribution key. Creating a NULL policy entry.
CREATE TABLE
testDB=# create table test2 (col1 mytype[]);
ERROR: type "mytype[]" does not exist

Cause

GPDB 4.3.x does not support array for composite type. 

Solution

Greenplum(GPDB) 5.x.x will support this feature. Please update as soon as it is available if table array is a tool you need to use frequently. 

Comments

Powered by Zendesk