Skip to content

Commit ef3f07e

Browse files
committed
sql: add logic tests for ALTER TABLE ALTER COLUMN identity options
The tests were incomplete. These options aren't supported so this is for consistency between the legacy and declarative schema changers. Epic: CRDB-31283 Part of: cockroachdb#142914 Release note: None
1 parent eb2465b commit ef3f07e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

pkg/sql/logictest/testdata/logic_test/alter_table

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4382,6 +4382,27 @@ ALTER TABLE t_alter_identity ALTER COLUMN z SET START WITH 5;
43824382

43834383
# Verify sequence options are implemented on the identity
43844384

4385+
statement error sequence option "AS" not supported here
4386+
ALTER TABLE t_alter_identity ALTER COLUMN a SET AS INT4;
4387+
4388+
statement error pq: unimplemented: CYCLE option is not supported
4389+
ALTER TABLE t_alter_identity ALTER COLUMN a SET CYCLE;
4390+
4391+
statement ok
4392+
ALTER TABLE t_alter_identity ALTER COLUMN a SET NO CYCLE;
4393+
4394+
statement error sequence option "OWNED BY" not supported here
4395+
ALTER TABLE t_alter_identity ALTER COLUMN a SET OWNED BY NONE;
4396+
4397+
statement ok
4398+
ALTER TABLE t_alter_identity ALTER COLUMN a SET PER NODE CACHE 5;
4399+
4400+
statement ok
4401+
ALTER TABLE t_alter_identity ALTER COLUMN a SET PER SESSION CACHE 5;
4402+
4403+
statement error sequence option "VIRTUAL" not supported here
4404+
ALTER TABLE t_alter_identity ALTER COLUMN a SET VIRTUAL;
4405+
43854406
statement ok
43864407
INSERT INTO t_alter_identity DEFAULT VALUES;
43874408

0 commit comments

Comments
 (0)