*** F:/postgresql/src/test/regress/expected/create_function_1.out Thu Jan 8 20:43:05 2015 --- F:/postgresql/src/test/regress/results/create_function_1.out Thu Jan 8 20:43:29 2015 *************** *** 27,40 **** --- 27,43 ---- RETURNS trigger AS 'F:/postgresql/src/test/regress/refint.dll' LANGUAGE C; + ERROR: could not access file "F:/postgresql/src/test/regress/refint.dll": No such file or directory CREATE FUNCTION check_foreign_key () RETURNS trigger AS 'F:/postgresql/src/test/regress/refint.dll' LANGUAGE C; + ERROR: could not access file "F:/postgresql/src/test/regress/refint.dll": No such file or directory CREATE FUNCTION autoinc () RETURNS trigger AS 'F:/postgresql/src/test/regress/autoinc.dll' LANGUAGE C; + ERROR: could not access file "F:/postgresql/src/test/regress/autoinc.dll": No such file or directory CREATE FUNCTION funny_dup17 () RETURNS trigger AS 'F:/postgresql/src/test/regress/regress.dll' ====================================================================== *** F:/postgresql/src/test/regress/expected/triggers.out Wed Jan 7 15:23:55 2015 --- F:/postgresql/src/test/regress/results/triggers.out Thu Jan 8 20:43:36 2015 *************** *** 24,33 **** --- 24,35 ---- for each row execute procedure check_primary_key ('fkey1', 'fkey2', 'pkeys', 'pkey1', 'pkey2'); + ERROR: function check_primary_key() does not exist create trigger check_fkeys_pkey2_exist before insert or update on fkeys for each row execute procedure check_primary_key ('fkey3', 'fkeys2', 'pkey23'); + ERROR: function check_primary_key() does not exist -- -- For fkeys2: -- (fkey21, fkey22) --> pkeys (pkey1, pkey2) *************** *** 37,47 **** --- 39,52 ---- for each row execute procedure check_primary_key ('fkey21', 'fkey22', 'pkeys', 'pkey1', 'pkey2'); + ERROR: function check_primary_key() does not exist -- Test comments COMMENT ON TRIGGER check_fkeys2_pkey_bad ON fkeys2 IS 'wrong'; ERROR: trigger "check_fkeys2_pkey_bad" for table "fkeys2" does not exist COMMENT ON TRIGGER check_fkeys2_pkey_exist ON fkeys2 IS 'right'; + ERROR: trigger "check_fkeys2_pkey_exist" for table "fkeys2" does not exist COMMENT ON TRIGGER check_fkeys2_pkey_exist ON fkeys2 IS NULL; + ERROR: trigger "check_fkeys2_pkey_exist" for table "fkeys2" does not exist -- -- For pkeys: -- ON DELETE/UPDATE (pkey1, pkey2) CASCADE: *************** *** 53,58 **** --- 58,64 ---- execute procedure check_foreign_key (2, 'cascade', 'pkey1', 'pkey2', 'fkeys', 'fkey1', 'fkey2', 'fkeys2', 'fkey21', 'fkey22'); + ERROR: function check_foreign_key() does not exist -- -- For fkeys2: -- ON DELETE/UPDATE (pkey23) RESTRICT: *************** *** 62,101 **** before delete or update on fkeys2 for each row execute procedure check_foreign_key (1, 'restrict', 'pkey23', 'fkeys', 'fkey3'); insert into fkeys2 values (10, '1', 1); insert into fkeys2 values (30, '3', 2); insert into fkeys2 values (40, '4', 5); insert into fkeys2 values (50, '5', 3); -- no key in pkeys insert into fkeys2 values (70, '5', 3); - ERROR: tuple references non-existent key - DETAIL: Trigger "check_fkeys2_pkey_exist" found tuple referencing non-existent key in "pkeys". insert into fkeys values (10, '1', 2); insert into fkeys values (30, '3', 3); insert into fkeys values (40, '4', 2); insert into fkeys values (50, '5', 2); -- no key in pkeys insert into fkeys values (70, '5', 1); - ERROR: tuple references non-existent key - DETAIL: Trigger "check_fkeys_pkey_exist" found tuple referencing non-existent key in "pkeys". -- no key in fkeys2 insert into fkeys values (60, '6', 4); - ERROR: tuple references non-existent key - DETAIL: Trigger "check_fkeys_pkey2_exist" found tuple referencing non-existent key in "fkeys2". delete from pkeys where pkey1 = 30 and pkey2 = '3'; - NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted - ERROR: "check_fkeys2_fkey_restrict": tuple is referenced in "fkeys" - CONTEXT: SQL statement "delete from fkeys2 where fkey21 = $1 and fkey22 = $2 " delete from pkeys where pkey1 = 40 and pkey2 = '4'; - NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted - NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys2 are deleted update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 50 and pkey2 = '5'; - NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted - ERROR: "check_fkeys2_fkey_restrict": tuple is referenced in "fkeys" - CONTEXT: SQL statement "delete from fkeys2 where fkey21 = $1 and fkey22 = $2 " update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 10 and pkey2 = '1'; ! NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted ! NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys2 are deleted DROP TABLE pkeys; DROP TABLE fkeys; DROP TABLE fkeys2; --- 68,94 ---- before delete or update on fkeys2 for each row execute procedure check_foreign_key (1, 'restrict', 'pkey23', 'fkeys', 'fkey3'); + ERROR: function check_foreign_key() does not exist insert into fkeys2 values (10, '1', 1); insert into fkeys2 values (30, '3', 2); insert into fkeys2 values (40, '4', 5); insert into fkeys2 values (50, '5', 3); -- no key in pkeys insert into fkeys2 values (70, '5', 3); insert into fkeys values (10, '1', 2); insert into fkeys values (30, '3', 3); insert into fkeys values (40, '4', 2); insert into fkeys values (50, '5', 2); -- no key in pkeys insert into fkeys values (70, '5', 1); -- no key in fkeys2 insert into fkeys values (60, '6', 4); delete from pkeys where pkey1 = 30 and pkey2 = '3'; delete from pkeys where pkey1 = 40 and pkey2 = '4'; update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 50 and pkey2 = '5'; update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 10 and pkey2 = '1'; ! ERROR: duplicate key value violates unique constraint "pkeys_i" ! DETAIL: Key (pkey1, pkey2)=(7, 70) already exists. DROP TABLE pkeys; DROP TABLE fkeys; DROP TABLE fkeys2; *************** *** 150,173 **** for each row execute procedure autoinc (price_on, ttdummy_seq); insert into tttest values (1, 1, null); insert into tttest values (2, 2, null); insert into tttest values (3, 3, 0); select * from tttest; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 1 | 1 | 10 | 999999 ! 2 | 2 | 20 | 999999 ! 3 | 3 | 30 | 999999 (3 rows) delete from tttest where price_id = 2; select * from tttest; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 1 | 1 | 10 | 999999 ! 3 | 3 | 30 | 999999 ! 2 | 2 | 20 | 40 (3 rows) -- what do we see ? --- 143,168 ---- for each row execute procedure autoinc (price_on, ttdummy_seq); + ERROR: function autoinc() does not exist insert into tttest values (1, 1, null); insert into tttest values (2, 2, null); insert into tttest values (3, 3, 0); select * from tttest; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 1 | 1 | | 999999 ! 2 | 2 | | 999999 ! 3 | 3 | 0 | 999999 (3 rows) delete from tttest where price_id = 2; + ERROR: ttdummy (tttest): price_on must be NOT NULL select * from tttest; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 1 | 1 | | 999999 ! 2 | 2 | | 999999 ! 3 | 3 | 0 | 999999 (3 rows) -- what do we see ? *************** *** 175,193 **** select * from tttest where price_off = 999999; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 1 | 1 | 10 | 999999 ! 3 | 3 | 30 | 999999 ! (2 rows) -- change price for price_id == 3 update tttest set price_val = 30 where price_id = 3; select * from tttest; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 1 | 1 | 10 | 999999 ! 2 | 2 | 20 | 40 ! 3 | 30 | 50 | 999999 ! 3 | 3 | 30 | 50 (4 rows) -- now we want to change pric_id in ALL tuples --- 170,189 ---- select * from tttest where price_off = 999999; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 1 | 1 | | 999999 ! 2 | 2 | | 999999 ! 3 | 3 | 0 | 999999 ! (3 rows) -- change price for price_id == 3 update tttest set price_val = 30 where price_id = 3; select * from tttest; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 1 | 1 | | 999999 ! 2 | 2 | | 999999 ! 3 | 30 | 0 | 999999 ! 3 | 3 | 0 | 0 (4 rows) -- now we want to change pric_id in ALL tuples *************** *** 196,206 **** select * from tttest; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 1 | 1 | 10 | 999999 ! 2 | 2 | 20 | 40 ! 3 | 3 | 30 | 50 ! 5 | 30 | 60 | 999999 ! 3 | 30 | 50 | 60 (5 rows) -- restore data as before last update: --- 192,202 ---- select * from tttest; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 1 | 1 | | 999999 ! 2 | 2 | | 999999 ! 3 | 3 | 0 | 0 ! 5 | 30 | 10 | 999999 ! 3 | 30 | 0 | 10 (5 rows) -- restore data as before last update: *************** *** 215,224 **** select * from tttest; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 1 | 1 | 10 | 999999 ! 2 | 2 | 20 | 40 ! 3 | 3 | 30 | 50 ! 3 | 30 | 50 | 999999 (4 rows) -- and try change price_id now! --- 211,220 ---- select * from tttest; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 1 | 1 | | 999999 ! 2 | 2 | | 999999 ! 3 | 3 | 0 | 0 ! 3 | 30 | 0 | 999999 (4 rows) -- and try change price_id now! *************** *** 226,235 **** select * from tttest; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 1 | 1 | 10 | 999999 ! 2 | 2 | 20 | 40 ! 5 | 3 | 30 | 50 ! 5 | 30 | 50 | 999999 (4 rows) -- isn't it what we need ? --- 222,231 ---- select * from tttest; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 1 | 1 | | 999999 ! 2 | 2 | | 999999 ! 5 | 3 | 0 | 0 ! 5 | 30 | 0 | 999999 (4 rows) -- isn't it what we need ? *************** *** 241,247 **** -- we want to correct some "date" update tttest set price_on = -1 where price_id = 1; ! ERROR: ttdummy (tttest): you cannot change price_on and/or price_off columns (use set_ttdummy) -- but this doesn't work -- try in this way select set_ttdummy(0); --- 237,243 ---- -- we want to correct some "date" update tttest set price_on = -1 where price_id = 1; ! ERROR: ttdummy (tttest): price_on must be NOT NULL -- but this doesn't work -- try in this way select set_ttdummy(0); *************** *** 254,262 **** select * from tttest; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 2 | 2 | 20 | 40 ! 5 | 3 | 30 | 50 ! 5 | 30 | 50 | 999999 1 | 1 | -1 | 999999 (4 rows) --- 250,258 ---- select * from tttest; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 2 | 2 | | 999999 ! 5 | 3 | 0 | 0 ! 5 | 30 | 0 | 999999 1 | 1 | -1 | 999999 (4 rows) *************** *** 265,271 **** select * from tttest where price_on <= 35 and price_off > 35 and price_id = 5; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 5 | 3 | 30 | 50 (1 row) drop table tttest; --- 261,267 ---- select * from tttest where price_on <= 35 and price_off > 35 and price_id = 5; price_id | price_val | price_on | price_off ----------+-----------+----------+----------- ! 5 | 30 | 0 | 999999 (1 row) drop table tttest; ====================================================================== *** F:/postgresql/src/test/regress/expected/security_label.out Thu Jan 8 20:43:05 2015 --- F:/postgresql/src/test/regress/results/security_label.out Thu Jan 8 20:43:47 2015 *************** *** 31,82 **** ERROR: no security label providers have been loaded -- Load dummy external security provider LOAD 'F:/postgresql/src/test/regress/dummy_seclabel.dll'; -- -- Test of SECURITY LABEL statement with a plugin -- SET SESSION AUTHORIZATION seclabel_user1; SECURITY LABEL ON TABLE seclabel_tbl1 IS 'classified'; -- OK SECURITY LABEL ON COLUMN seclabel_tbl1.a IS 'unclassified'; -- OK SECURITY LABEL ON COLUMN seclabel_tbl1 IS 'unclassified'; -- fail ! ERROR: column name must be qualified SECURITY LABEL ON TABLE seclabel_tbl1 IS '...invalid label...'; -- fail ! ERROR: '...invalid label...' is not a valid security label SECURITY LABEL FOR 'dummy' ON TABLE seclabel_tbl1 IS 'unclassified'; -- OK SECURITY LABEL FOR 'unknown_seclabel' ON TABLE seclabel_tbl1 IS 'classified'; -- fail ERROR: security label provider "unknown_seclabel" is not loaded SECURITY LABEL ON TABLE seclabel_tbl2 IS 'unclassified'; -- fail (not owner) ! ERROR: must be owner of relation seclabel_tbl2 SECURITY LABEL ON TABLE seclabel_tbl1 IS 'secret'; -- fail (not superuser) ! ERROR: only superuser can set 'secret' label SECURITY LABEL ON TABLE seclabel_tbl3 IS 'unclassified'; -- fail (not found) ! ERROR: relation "seclabel_tbl3" does not exist in RangeVarGetRelid SET SESSION AUTHORIZATION seclabel_user2; SECURITY LABEL ON TABLE seclabel_tbl1 IS 'unclassified'; -- fail ! ERROR: must be owner of relation seclabel_tbl1 SECURITY LABEL ON TABLE seclabel_tbl2 IS 'classified'; -- OK RESET SESSION AUTHORIZATION; SECURITY LABEL ON TABLE seclabel_tbl1 IS 'top secret'; -- OK SECURITY LABEL ON VIEW seclabel_view1 IS 'classified'; -- OK SECURITY LABEL ON FUNCTION seclabel_four() IS 'classified'; -- OK SECURITY LABEL ON DOMAIN seclabel_domain IS 'classified'; -- OK SECURITY LABEL ON LANGUAGE plpgsql IS 'unclassified'; -- OK SECURITY LABEL ON SCHEMA public IS 'unclassified'; -- OK SELECT objtype, objname, provider, label FROM pg_seclabels ORDER BY objtype, objname; objtype | objname | provider | label ! ----------+-----------------+----------+-------------- ! column | seclabel_tbl1.a | dummy | unclassified ! domain | seclabel_domain | dummy | classified ! function | seclabel_four() | dummy | classified ! language | plpgsql | dummy | unclassified ! schema | public | dummy | unclassified ! table | seclabel_tbl1 | dummy | top secret ! table | seclabel_tbl2 | dummy | classified ! view | seclabel_view1 | dummy | classified ! (8 rows) SECURITY LABEL ON LANGUAGE plpgsql IS NULL; -- OK SECURITY LABEL ON SCHEMA public IS NULL; -- OK -- clean up objects DROP FUNCTION seclabel_four(); DROP DOMAIN seclabel_domain; --- 31,87 ---- ERROR: no security label providers have been loaded -- Load dummy external security provider LOAD 'F:/postgresql/src/test/regress/dummy_seclabel.dll'; + ERROR: could not access file "F:/postgresql/src/test/regress/dummy_seclabel.dll": No such file or directory -- -- Test of SECURITY LABEL statement with a plugin -- SET SESSION AUTHORIZATION seclabel_user1; SECURITY LABEL ON TABLE seclabel_tbl1 IS 'classified'; -- OK + ERROR: no security label providers have been loaded SECURITY LABEL ON COLUMN seclabel_tbl1.a IS 'unclassified'; -- OK + ERROR: no security label providers have been loaded SECURITY LABEL ON COLUMN seclabel_tbl1 IS 'unclassified'; -- fail ! ERROR: no security label providers have been loaded SECURITY LABEL ON TABLE seclabel_tbl1 IS '...invalid label...'; -- fail ! ERROR: no security label providers have been loaded SECURITY LABEL FOR 'dummy' ON TABLE seclabel_tbl1 IS 'unclassified'; -- OK + ERROR: security label provider "dummy" is not loaded SECURITY LABEL FOR 'unknown_seclabel' ON TABLE seclabel_tbl1 IS 'classified'; -- fail ERROR: security label provider "unknown_seclabel" is not loaded SECURITY LABEL ON TABLE seclabel_tbl2 IS 'unclassified'; -- fail (not owner) ! ERROR: no security label providers have been loaded SECURITY LABEL ON TABLE seclabel_tbl1 IS 'secret'; -- fail (not superuser) ! ERROR: no security label providers have been loaded SECURITY LABEL ON TABLE seclabel_tbl3 IS 'unclassified'; -- fail (not found) ! ERROR: no security label providers have been loaded SET SESSION AUTHORIZATION seclabel_user2; SECURITY LABEL ON TABLE seclabel_tbl1 IS 'unclassified'; -- fail ! ERROR: no security label providers have been loaded SECURITY LABEL ON TABLE seclabel_tbl2 IS 'classified'; -- OK + ERROR: no security label providers have been loaded RESET SESSION AUTHORIZATION; SECURITY LABEL ON TABLE seclabel_tbl1 IS 'top secret'; -- OK + ERROR: no security label providers have been loaded SECURITY LABEL ON VIEW seclabel_view1 IS 'classified'; -- OK + ERROR: no security label providers have been loaded SECURITY LABEL ON FUNCTION seclabel_four() IS 'classified'; -- OK + ERROR: no security label providers have been loaded SECURITY LABEL ON DOMAIN seclabel_domain IS 'classified'; -- OK + ERROR: no security label providers have been loaded SECURITY LABEL ON LANGUAGE plpgsql IS 'unclassified'; -- OK + ERROR: no security label providers have been loaded SECURITY LABEL ON SCHEMA public IS 'unclassified'; -- OK + ERROR: no security label providers have been loaded SELECT objtype, objname, provider, label FROM pg_seclabels ORDER BY objtype, objname; objtype | objname | provider | label ! ---------+---------+----------+------- ! (0 rows) SECURITY LABEL ON LANGUAGE plpgsql IS NULL; -- OK + ERROR: no security label providers have been loaded SECURITY LABEL ON SCHEMA public IS NULL; -- OK + ERROR: no security label providers have been loaded -- clean up objects DROP FUNCTION seclabel_four(); DROP DOMAIN seclabel_domain; ======================================================================