Changeset: 895eed956e4e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=895eed956e4e Modified Files: sql/test/testdb/Tests/testdb-dump.stable.out sql/test/testdb/Tests/testdb-load.sql Branch: default Log Message:
Test dumping of comments and indexes. diffs (110 lines): diff --git a/sql/test/testdb/Tests/testdb-dump.stable.out b/sql/test/testdb/Tests/testdb-dump.stable.out --- a/sql/test/testdb/Tests/testdb-dump.stable.out +++ b/sql/test/testdb/Tests/testdb-dump.stable.out @@ -26,15 +26,22 @@ Ready. START TRANSACTION; CREATE USER "testuser" WITH ENCRYPTED PASSWORD 'e9e633097ab9ceb3e48ec3f70ee2beba41d05d5420efee5da85f97d97005727587fda33ef4ff2322088f4c79e8133cc9cd9f3512f4d3a303cbdb5bc585415a00' NAME 'Test User' SCHEMA "sys"; CREATE SCHEMA "testschema" AUTHORIZATION "testuser"; +COMMENT ON SCHEMA "testschema" IS 'a schema used for testing'; ALTER USER "testuser" SET SCHEMA "testschema"; CREATE SEQUENCE "testschema"."selfref_seq" AS INTEGER; +COMMENT ON SEQUENCE "testschema"."selfref_seq" IS 'sequence number for selfref table'; CREATE SEQUENCE "testschema"."test_seq" AS INTEGER; +COMMENT ON SEQUENCE "testschema"."test_seq" IS 'sequence number for testing'; SET SCHEMA "testschema"; CREATE TABLE "testschema"."smallstring" ( "string1" VARCHAR(5), "string2" CHAR(5), "string3" CHARACTER LARGE OBJECT ); +COMMENT ON TABLE "testschema"."smallstring" IS 'table to test small strings'; +COMMENT ON COLUMN "testschema"."smallstring"."string1" IS 'first column of table to test small strings'; +COMMENT ON COLUMN "testschema"."smallstring"."string2" IS 'second column of table to test small strings'; +COMMENT ON COLUMN "testschema"."smallstring"."string3" IS 'third column of table to test small strings'; COPY 66 RECORDS INTO "testschema"."smallstring" FROM stdin USING DELIMITERS '\t','\n','"'; "a0" "b0" "c0" "a1" "b1" "c1" @@ -101120,6 +101127,12 @@ CREATE TABLE "testschema"."test" ( "id" INTEGER, "i" SMALLINT DEFAULT next value for "testschema"."test_seq" ); +CREATE INDEX "i1" ON "testschema"."test" ("id", "i"); +CREATE ORDERED INDEX "i2" ON "testschema"."test" ("id"); +CREATE IMPRINTS INDEX "i3" ON "testschema"."test" ("id"); +COMMENT ON INDEX "testschema"."i1" IS 'a unique index used for testing'; +COMMENT ON INDEX "testschema"."i2" IS 'an ordered index used for testing'; +COMMENT ON INDEX "testschema"."i3" IS 'an imprints index used for testing'; COPY 5 RECORDS INTO "testschema"."test" FROM stdin USING DELIMITERS '\t','\n','"'; 0 7 1 10 @@ -101281,6 +101294,7 @@ ALTER TABLE "testschema"."mt2" ADD TABLE ALTER TABLE "testschema"."mt1" ADD TABLE "t1"; ALTER TABLE "testschema"."mt1" ADD TABLE "t2"; create view keytest3 as select t2.key1, t2.key2, t1.key3 from keytest1 t1, keytest2 t2 where t1.key1 = t2.key1 and t1.key2 = t2.key2; +COMMENT ON VIEW "testschema"."keytest3" IS 'a view used for testing'; create trigger keytesttrigger after update on keytest1 referencing new row as new_row for each row insert into keytest2 values (new_row.key1, new_row.key2); create function keyjoin() returns table ( @@ -101295,6 +101309,7 @@ begin where keytest1.key1 = keytest2.key1 and keytest1.key2 = keytest2.key2 ); end; +COMMENT ON FUNCTION "testschema"."keyjoin"() IS 'function used for testing'; create function nleaves() returns integer begin diff --git a/sql/test/testdb/Tests/testdb-load.sql b/sql/test/testdb/Tests/testdb-load.sql --- a/sql/test/testdb/Tests/testdb-load.sql +++ b/sql/test/testdb/Tests/testdb-load.sql @@ -5,15 +5,22 @@ START TRANSACTION; -- CREATE USER "testuser" WITH PASSWORD 'testpassword' NAME 'Test User' SCHEMA "sys"; CREATE USER "testuser" WITH ENCRYPTED PASSWORD 'e9e633097ab9ceb3e48ec3f70ee2beba41d05d5420efee5da85f97d97005727587fda33ef4ff2322088f4c79e8133cc9cd9f3512f4d3a303cbdb5bc585415a00' NAME 'Test User' SCHEMA "sys"; CREATE SCHEMA "testschema" AUTHORIZATION "testuser"; +COMMENT ON SCHEMA testschema IS 'a schema used for testing'; ALTER USER "testuser" SET SCHEMA "testschema"; SET SCHEMA "testschema"; CREATE SEQUENCE "testschema"."selfref_seq" AS INTEGER; +COMMENT ON SEQUENCE selfref_seq IS 'sequence number for selfref table'; CREATE SEQUENCE "testschema"."test_seq" AS INTEGER; +COMMENT ON SEQUENCE test_seq IS 'sequence number for testing'; CREATE TABLE "testschema"."smallstring" ( "string1" VARCHAR(5), "string2" CHAR(5), "string3" CHARACTER LARGE OBJECT ); +COMMENT ON TABLE smallstring IS 'table to test small strings'; +COMMENT ON COLUMN smallstring.string1 IS 'first column of table to test small strings'; +COMMENT ON COLUMN smallstring.string2 IS 'second column of table to test small strings'; +COMMENT ON COLUMN smallstring.string3 IS 'third column of table to test small strings'; COPY 66 RECORDS INTO "testschema"."smallstring" FROM stdin USING DELIMITERS '\t','\n','"'; "a0" "b0" "c0" "a1" "b1" "c1" @@ -101105,6 +101112,12 @@ 1 10 2 5 3 8 4 5 +CREATE INDEX "i1" ON "testschema"."test" (id, i); +CREATE ORDERED INDEX "i2" ON "testschema"."test" ("id"); +CREATE IMPRINTS INDEX "i3" ON "testschema"."test" ("id"); +comment on index i1 is 'a unique index used for testing'; +comment on index i2 is 'an ordered index used for testing'; +comment on index i3 is 'an imprints index used for testing'; CREATE TABLE "testschema"."typestest" ( "boolean" BOOLEAN, "tinyint" TINYINT, @@ -101177,6 +101190,7 @@ 0 1 1 0 1 1 create view keytest3 as select t2.key1, t2.key2, t1.key3 from keytest1 t1, keytest2 t2 where t1.key1 = t2.key1 and t1.key2 = t2.key2; +comment on view keytest3 is 'a view used for testing'; create trigger keytesttrigger after update on keytest1 referencing new row as new_row for each row insert into keytest2 values (new_row.key1, new_row.key2); create function keyjoin() returns table ( @@ -101192,6 +101206,7 @@ begin ); end; grant execute on function keyjoin to public; +comment on function keyjoin is 'function used for testing'; CREATE TABLE "testschema"."selfref" ( "id" INTEGER NOT NULL DEFAULT next value for "testschema"."selfref_seq", "parentid" INTEGER, _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list