Unable to add column to column orientated table
search cancel

Unable to add column to column orientated table

book

Article ID: 295624

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

  • Trying to add a column to a column orientated table, with column orientated compression options
  • Failing to add column stating that the table is not column orientated
  • Table is a parent partition table
  • Confirmed that the table is column orientated
    \d <table_name>
    Append-Only Columnar Table "<table_name>"

Error Message:

ERROR: ENCODING clause supplied for table that is not column oriented
SQL state: 0A000

Cause

When adding a column to an orientated partition table, make sure that all the child partition tables are also orientated. All the parent and child partition tables are created with the same conditions and have the same orientation. 

Resolution

If the child partition tables are not column orientated, you will have to:

  1. Rename existing tables
  2. Create new parent and child tables as column orientated with existing names
  3. Copy data from old tables to new 
  4. Then you can add new column