You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no way to create constraints to tables, which have been created using CTAS, is there? Does anyone know a workaround? I don't want to set all the columns manually.
testcase
D CREATE TABLE test AS SELECT * FROM read_csv('test.csv', sample_size = 9E18);
D ALTER TABLE test ADD CONSTRAINT unique_constraint UNIQUE (col1, col2, col3);
Not implemented Error: No support for that ALTER TABLE option yet!
possible workaround
Export the database and do some shell-scripting on schema.sql. Ugly.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
question
There's no way to create constraints to tables, which have been created using CTAS, is there? Does anyone know a workaround? I don't want to set all the columns manually.
testcase
possible workaround
Export the database and do some shell-scripting on
schema.sql
. Ugly.Beta Was this translation helpful? Give feedback.
All reactions