Skip to content

Commit

Permalink
[YSQL]: #2226 Added a comment to ALTER COLUMN add/set/drop identity t…
Browse files Browse the repository at this point in the history
…est.

Summary: Add missing comments.

Test Plan: ./yb_build.sh --java-test org.yb.pgsql.TestPgRegressPgMiscIndependent

Reviewers: neha

Reviewed By: neha

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D7222
  • Loading branch information
Zhongwei Zhao committed Sep 20, 2019
1 parent 6c8d530 commit 4b0ac31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/postgres/src/test/regress/expected/yb_pg_identity.out
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ CREATE TABLE itest3 (a smallint generated by default as identity (start with 7 i
ALTER TABLE itest3 ALTER COLUMN a ADD GENERATED ALWAYS AS IDENTITY; -- error
ERROR: column "a" of relation "itest3" is already an identity column
-- drop extra sequence created by alter table
-- this is needed due to #1383 and can be removed after the issue is fixed.
DROP SEQUENCE itest3_a_seq1;
SELECT table_name, column_name, column_default, is_nullable, is_identity, identity_generation, identity_start, identity_increment, identity_maximum, identity_minimum, identity_cycle FROM information_schema.columns WHERE table_name LIKE 'itest_' ORDER BY 1, 2;
table_name | column_name | column_default | is_nullable | is_identity | identity_generation | identity_start | identity_increment | identity_maximum | identity_minimum | identity_cycle
Expand Down
1 change: 1 addition & 0 deletions src/postgres/src/test/regress/sql/yb_pg_identity.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CREATE TABLE itest2 (a bigint generated always as identity, b text);
CREATE TABLE itest3 (a smallint generated by default as identity (start with 7 increment by 5), b text);
ALTER TABLE itest3 ALTER COLUMN a ADD GENERATED ALWAYS AS IDENTITY; -- error
-- drop extra sequence created by alter table
-- this is needed due to #1383 and can be removed after the issue is fixed.
DROP SEQUENCE itest3_a_seq1;

SELECT table_name, column_name, column_default, is_nullable, is_identity, identity_generation, identity_start, identity_increment, identity_maximum, identity_minimum, identity_cycle FROM information_schema.columns WHERE table_name LIKE 'itest_' ORDER BY 1, 2;
Expand Down

0 comments on commit 4b0ac31

Please sign in to comment.