summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-11-04 03:08:11 +0000
committerBruce Momjian <bruce@momjian.us>2001-11-04 03:08:11 +0000
commit7cc8af556363f65c9fd1ae89ae97da2b295f53a3 (patch)
tree31f79b8f1ca8c56ba5b7eb239569063edbbff038 /src/test
parent434077c4e6f339db46aebd89c2d34da25cad34bd (diff)
downloadpostgresql-7cc8af556363f65c9fd1ae89ae97da2b295f53a3.tar.gz
Got "ADD" to appear only in ALTER TABLE and not CREATE TABLE
UNIQUE-PRIMARY KEY notice message. This is what Christopher wanted from his patch.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/alter_table.out10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index 6d05b26dcf..f0232af426 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -452,7 +452,7 @@ drop table atacc1;
create table atacc1 ( test int );
-- add a unique constraint
alter table atacc1 add constraint atacc_test1 unique (test);
-NOTICE: ALTER TABLE / UNIQUE will create implicit index 'atacc_test1' for table 'atacc1'
+NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index 'atacc_test1' for table 'atacc1'
-- insert first value
insert into atacc1 (test) values (2);
-- should fail
@@ -462,7 +462,7 @@ ERROR: Cannot insert a duplicate key into unique index atacc_test1
insert into atacc1 (test) values (4);
-- try adding a unique oid constraint
alter table atacc1 add constraint atacc_oid1 unique(oid);
-NOTICE: ALTER TABLE / UNIQUE will create implicit index 'atacc_oid1' for table 'atacc1'
+NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index 'atacc_oid1' for table 'atacc1'
drop table atacc1;
-- let's do one where the unique constraint fails when added
create table atacc1 ( test int );
@@ -471,7 +471,7 @@ insert into atacc1 (test) values (2);
insert into atacc1 (test) values (2);
-- add a unique constraint (fails)
alter table atacc1 add constraint atacc_test1 unique (test);
- NOTICE: ALTER TABLE / UNIQUE will create implicit index 'atacc_test1' for table 'atacc1'
+ NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index 'atacc_test1' for table 'atacc1'
ERROR: Cannot create unique index. Table contains non-unique values
insert into atacc1 (test) values (3);
drop table atacc1;
@@ -486,7 +486,7 @@ drop table atacc1;
create table atacc1 ( test int, test2 int);
-- add a unique constraint
alter table atacc1 add constraint atacc_test1 unique (test, test2);
-NOTICE: ALTER TABLE / UNIQUE will create implicit index 'atacc_test1' for table 'atacc1'
+NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index 'atacc_test1' for table 'atacc1'
-- insert initial value
insert into atacc1 (test,test2) values (4,4);
-- should fail
@@ -501,7 +501,7 @@ drop table atacc1;
create table atacc1 (test int, test2 int, unique(test));
NOTICE: CREATE TABLE / UNIQUE will create implicit index 'atacc1_test_key' for table 'atacc1'
alter table atacc1 add unique (test2);
-NOTICE: ALTER TABLE / UNIQUE will create implicit index 'atacc1_test2_key' for table 'atacc1'
+NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index 'atacc1_test2_key' for table 'atacc1'
-- should fail for @@ second one @@
insert into atacc1 (test2, test) values (3, 3);
insert into atacc1 (test2, test) values (2, 3);