Help... ROLLBACK 7976: Add column with default subquery is not supported for unsegmented projection
kfruchtman
Vertica Customer ✭
I have done the same as on this post:
https://forum.vertica.com/discussion/241554/how-to-add-a-new-column-to-a-table-efficiently
and when I alter the micky table on my db and giving this command:
ALTER TABLE mickey
ADD months_worked INTEGER DEFAULT(SELECT months_worked FROM helper WHERE id=mickey.id);
This is what I get:
ROLLBACK 7976: Add column with default subquery is not supported for unsegmented projections
DETAIL: Projection "spins_DBD_15_rep_test_ittai_3" is unsegmented and is either super projection or specified in the projection list
how can I workaround that?
I am working on Vertica 9.3 version.
Please help me!
Keren
0
Answers
Can you share us with the export objects of the table mickey?
@kfruchtman - This is a bug. I opened a Jira to get it fixed and will update this thread with the hotfix when it is avaiable.
Note that you can use SET USING...
Example:
Although not ideal, you can also just have segemented projections (for now) on the anchor table mickey...
That is a superb workaround!
Can I ask you another question? is there a way to automate this whole procedure? lets say table micky was updated from an outside source without the new column populated and everyday I need to update the helper table and then update the micky with the new value for the new column.Is it possible somehow?
many thanks
Keren