rules regression test - Mailing list pgsql-hackers
From | Patrick Welche |
---|---|
Subject | rules regression test |
Date | |
Msg-id | E10iLQy-0001NA-00@quartz.newn.cam.ac.uk Whole thread Raw |
Responses |
Re: [HACKERS] rules regression test
Re: [HACKERS] rules regression test |
List | pgsql-hackers |
The rules test is the only that fails for me under NetBSD/i386, and this seems simply to be due to using a different userid. The expected result has viewowner=pgsql, my result has viewowner=postgres. I suspect that had I run "gmake runtest" as some other userid with access to the regression database some of those rows may have had yet a different viewowner. Would it be a good idea to omit viewowner in the test as per the following patches? (Less luck on NetBSD/arm32 - looks similar to someone elses posting for the mac port) Cheers, Patrick (Patches from src/test/regress) *** sql/rules.sql.orig Fri May 14 17:55:08 1999 --- sql/rules.sql Fri May 14 17:56:52 1999 *************** *** 686,692 **** -- -- Check that ruleutils are working -- ! SELECT * FROM pg_views ORDER BY viewname; SELECT * FROM pg_rules ORDER BY tablename, rulename; - --- 686,691 ---- -- -- Check that ruleutils are working -- ! SELECT viewname,definition FROM pg_views ORDER BY viewname; SELECT * FROM pg_rules ORDER BY tablename, rulename; *** expected/rules.out.orig Fri May 14 12:55:16 1999 --- expected/rules.out Fri May 14 18:01:45 1999 *************** *** 1064,1092 **** sl8 | 21|brown | 40|inch | 101.6 (9 rows) ! QUERY: SELECT * FROM pg_views ORDER BY viewname; ! viewname |viewowner|definition ! ------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ! iexit |pgsql |SELECT "ih"."name", "ih"."thepath", "interpt_pp"("ih"."thepath", "r"."thepath") AS "exit"FROM "ihighway" "ih", "ramp" "r" WHERE "ih"."thepath" ## "r"."thepath"; ! pg_indexes |pgsql |SELECT "c"."relname" AS "tablename", "i"."relname" AS "indexname", "pg_get_indexdef"("x"."indexrelid")AS "indexdef" FROM "pg_index" "x", "pg_class" "c", "pg_class" "i" WHERE ("c"."oid" = "x"."indrelid")AND ("i"."oid" = "x"."indexrelid"); ! pg_rules |pgsql |SELECT "c"."relname" AS "tablename", "r"."rulename", "pg_get_ruledef"("r"."rulename") AS "definition"FROM "pg_rewrite" "r", "pg_class" "c" WHERE ("r"."rulename" !~ '^_RET'::"text") AND ("c"."oid" = "r"."ev_class"); ! pg_tables |pgsql |SELECT "c"."relname" AS "tablename", "pg_get_userbyid"("c"."relowner") AS "tableowner", "c"."relhasindex"AS "hasindexes", "c"."relhasrules" AS "hasrules", "c"."reltriggers" > '0'::"int4" AS "hastriggers" FROM"pg_class" "c" WHERE (("c"."relkind" = 'r'::"char") OR ("c"."relkind" = 's'::"char")) AND (NOT (EXISTS (SELECT "rulename"FROM "pg_rewrite" WHERE ("ev_class" = "c"."oid") AND ("ev_type" = '1'::"char")))); ! pg_user |pgsql |SELECT "usename", "usesysid", "usecreatedb", "usetrace", "usesuper", "usecatupd", '********'::"text"AS "passwd", "valuntil" FROM "pg_shadow"; ! pg_views |pgsql |SELECT "c"."relname" AS "viewname", "pg_get_userbyid"("c"."relowner") AS "viewowner", "pg_get_viewdef"("c"."relname")AS "definition" FROM "pg_class" "c" WHERE ("c"."relhasrules") AND (EXISTS (SELECT "r"."rulename"FROM "pg_rewrite" "r" WHERE ("r"."ev_class" = "c"."oid") AND ("r"."ev_type" = '1'::"char"))); ! rtest_v1 |pgsql |SELECT "a", "b" FROM "rtest_t1"; ! rtest_vcomp |pgsql |SELECT "x"."part", "x"."size" * "y"."factor" AS "size_in_cm" FROM "rtest_comp" "x", "rtest_unitfact""y" WHERE "x"."unit" = "y"."unit"; ! rtest_vview1 |pgsql |SELECT "x"."a", "x"."b" FROM "rtest_view1" "x" WHERE '0'::"int4" < (SELECT "count"("y"."a")AS "count" FROM "rtest_view2" "y" WHERE "y"."a" = "x"."a"); ! rtest_vview2 |pgsql |SELECT "a", "b" FROM "rtest_view1" WHERE "v"; ! rtest_vview3 |pgsql |SELECT "x"."a", "x"."b" FROM "rtest_vview2" "x" WHERE '0'::"int4" < (SELECT "count"("y"."a")AS "count" FROM "rtest_view2" "y" WHERE "y"."a" = "x"."a"); ! rtest_vview4 |pgsql |SELECT "x"."a", "x"."b", "count"("y"."a") AS "refcount" FROM "rtest_view1" "x", "rtest_view2""y" WHERE "x"."a" = "y"."a" GROUP BY "x"."a", "x"."b"; ! rtest_vview5 |pgsql |SELECT "a", "b", "rtest_viewfunc1"("a") AS "refcount" FROM "rtest_view1"; ! shoe |pgsql |SELECT "sh"."shoename", "sh"."sh_avail", "sh"."slcolor", "sh"."slminlen", "sh"."slminlen"* "un"."un_fact" AS "slminlen_cm", "sh"."slmaxlen", "sh"."slmaxlen" * "un"."un_fact" AS "slmaxlen_cm", "sh"."slunit"FROM "shoe_data" "sh", "unit" "un" WHERE "sh"."slunit" = "un"."un_name"; ! shoe_ready |pgsql |SELECT "rsh"."shoename", "rsh"."sh_avail", "rsl"."sl_name", "rsl"."sl_avail", "int4smaller"("rsh"."sh_avail","rsl"."sl_avail") AS "total_avail" FROM "shoe" "rsh", "shoelace" "rsl" WHERE (("rsl"."sl_color"= "rsh"."slcolor") AND ("rsl"."sl_len_cm" >= "rsh"."slminlen_cm")) AND ("rsl"."sl_len_cm" <= "rsh"."slmaxlen_cm"); ! shoelace |pgsql |SELECT "s"."sl_name", "s"."sl_avail", "s"."sl_color", "s"."sl_len", "s"."sl_unit", "s"."sl_len"* "u"."un_fact" AS "sl_len_cm" FROM "shoelace_data" "s", "unit" "u" WHERE "s"."sl_unit" = "u"."un_name"; ! shoelace_candelete|pgsql |SELECT "sl_name", "sl_avail", "sl_color", "sl_len", "sl_unit", "sl_len_cm" FROM "shoelace_obsolete"WHERE "sl_avail" = '0'::"int4"; ! shoelace_obsolete |pgsql |SELECT "sl_name", "sl_avail", "sl_color", "sl_len", "sl_unit", "sl_len_cm" FROM "shoelace"WHERE NOT (EXISTS (SELECT "shoename" FROM "shoe" WHERE "slcolor" = "sl_color")); ! street |pgsql |SELECT "r"."name", "r"."thepath", "c"."cname" FROM "road" "r", "real_city" "c" WHERE "c"."outline"## "r"."thepath"; ! toyemp |pgsql |SELECT "name", "age", "location", '12'::"int4" * "salary" AS "annualsal" FROM "emp"; (20 rows) QUERY: SELECT * FROM pg_rulesORDER BY tablename, rulename; --- 1064,1092 ---- sl8 | 21|brown | 40|inch | 101.6 (9 rows) ! QUERY: SELECT viewname,definition FROM pg_views ORDER BY viewname; ! viewname |definition ! ------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ! iexit |SELECT "ih"."name", "ih"."thepath", "interpt_pp"("ih"."thepath", "r"."thepath") AS "exit" FROM "ihighway""ih", "ramp" "r" WHERE "ih"."thepath" ## "r"."thepath"; ! pg_indexes |SELECT "c"."relname" AS "tablename", "i"."relname" AS "indexname", "pg_get_indexdef"("x"."indexrelid")AS "indexdef" FROM "pg_index" "x", "pg_class" "c", "pg_class" "i" WHERE ("c"."oid" = "x"."indrelid")AND ("i"."oid" = "x"."indexrelid"); ! pg_rules |SELECT "c"."relname" AS "tablename", "r"."rulename", "pg_get_ruledef"("r"."rulename") AS "definition"FROM "pg_rewrite" "r", "pg_class" "c" WHERE ("r"."rulename" !~ '^_RET'::"text") AND ("c"."oid" = "r"."ev_class"); ! pg_tables |SELECT "c"."relname" AS "tablename", "pg_get_userbyid"("c"."relowner") AS "tableowner", "c"."relhasindex"AS "hasindexes", "c"."relhasrules" AS "hasrules", "c"."reltriggers" > '0'::"int4" AS "hastriggers" FROM"pg_class" "c" WHERE (("c"."relkind" = 'r'::"char") OR ("c"."relkind" = 's'::"char")) AND (NOT (EXISTS (SELECT "rulename"FROM "pg_rewrite" WHERE ("ev_class" = "c"."oid") AND ("ev_type" = '1'::"char")))); ! pg_user |SELECT "usename", "usesysid", "usecreatedb", "usetrace", "usesuper", "usecatupd", '********'::"text"AS "passwd", "valuntil" FROM "pg_shadow"; ! pg_views |SELECT "c"."relname" AS "viewname", "pg_get_userbyid"("c"."relowner") AS "viewowner", "pg_get_viewdef"("c"."relname")AS "definition" FROM "pg_class" "c" WHERE ("c"."relhasrules") AND (EXISTS (SELECT "r"."rulename"FROM "pg_rewrite" "r" WHERE ("r"."ev_class" = "c"."oid") AND ("r"."ev_type" = '1'::"char"))); ! rtest_v1 |SELECT "a", "b" FROM "rtest_t1"; ! rtest_vcomp |SELECT "x"."part", "x"."size" * "y"."factor" AS "size_in_cm" FROM "rtest_comp" "x", "rtest_unitfact""y" WHERE "x"."unit" = "y"."unit"; ! rtest_vview1 |SELECT "x"."a", "x"."b" FROM "rtest_view1" "x" WHERE '0'::"int4" < (SELECT "count"("y"."a") AS "count"FROM "rtest_view2" "y" WHERE "y"."a" = "x"."a"); ! rtest_vview2 |SELECT "a", "b" FROM "rtest_view1" WHERE "v"; ! rtest_vview3 |SELECT "x"."a", "x"."b" FROM "rtest_vview2" "x" WHERE '0'::"int4" < (SELECT "count"("y"."a") AS "count"FROM "rtest_view2" "y" WHERE "y"."a" = "x"."a"); ! rtest_vview4 |SELECT "x"."a", "x"."b", "count"("y"."a") AS "refcount" FROM "rtest_view1" "x", "rtest_view2" "y" WHERE"x"."a" = "y"."a" GROUP BY "x"."a", "x"."b"; ! rtest_vview5 |SELECT "a", "b", "rtest_viewfunc1"("a") AS "refcount" FROM "rtest_view1"; ! shoe |SELECT "sh"."shoename", "sh"."sh_avail", "sh"."slcolor", "sh"."slminlen", "sh"."slminlen" * "un"."un_fact"AS "slminlen_cm", "sh"."slmaxlen", "sh"."slmaxlen" * "un"."un_fact" AS "slmaxlen_cm", "sh"."slunit" FROM "shoe_data""sh", "unit" "un" WHERE "sh"."slunit" = "un"."un_name"; ! shoe_ready |SELECT "rsh"."shoename", "rsh"."sh_avail", "rsl"."sl_name", "rsl"."sl_avail", "int4smaller"("rsh"."sh_avail","rsl"."sl_avail") AS "total_avail" FROM "shoe" "rsh", "shoelace" "rsl" WHERE (("rsl"."sl_color"= "rsh"."slcolor") AND ("rsl"."sl_len_cm" >= "rsh"."slminlen_cm")) AND ("rsl"."sl_len_cm" <= "rsh"."slmaxlen_cm"); ! shoelace |SELECT "s"."sl_name", "s"."sl_avail", "s"."sl_color", "s"."sl_len", "s"."sl_unit", "s"."sl_len" * "u"."un_fact"AS "sl_len_cm" FROM "shoelace_data" "s", "unit" "u" WHERE "s"."sl_unit" = "u"."un_name"; ! shoelace_candelete|SELECT "sl_name", "sl_avail", "sl_color", "sl_len", "sl_unit", "sl_len_cm" FROM "shoelace_obsolete"WHERE "sl_avail" = '0'::"int4"; ! shoelace_obsolete |SELECT "sl_name", "sl_avail", "sl_color", "sl_len", "sl_unit", "sl_len_cm" FROM "shoelace" WHERE NOT(EXISTS (SELECT "shoename" FROM "shoe" WHERE "slcolor" = "sl_color")); ! street |SELECT "r"."name", "r"."thepath", "c"."cname" FROM "road" "r", "real_city" "c" WHERE "c"."outline" ##"r"."thepath"; ! toyemp |SELECT "name", "age", "location", '12'::"int4" * "salary" AS "annualsal" FROM "emp"; (20 rows) QUERY: SELECT * FROM pg_rules ORDER BYtablename, rulename;
pgsql-hackers by date: