How to change the encoding of a red column in place?

Is there a way to add / change the encoding of a table column in the source table without creating a new table and select all the contents from the old table to the new table?

+4
source share
3 answers

No, this is not supported.

In the documentation, the options you have are:

  • apply compression type or encoding to columns in a table manually when creating a table
  • use the COPY command to automatically analyze and apply compression (on an empty table)
  • specify the encoding for the column when it is added to the table using the ALTER TABLE command

From the same documentation

.

+6

You really do not need to create a parallel table with a new encoding. You can modify the existing table by adding a new column with the desired compression, update the new column with the values ​​from the old column, and finally delete the old column.

0
source

Source: https://habr.com/ru/post/1619451/


All Articles