GRANT SELECT ON TABLE pkg_history TO wb_security;
GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
+SET search_path = "alpha_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 'alpha'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+
+SET search_path = "amd64_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 'amd64'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+
+SET search_path = "arm_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 'arm'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+
+SET search_path = "armel_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 'armel'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+
+SET search_path = "hppa_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 'hppa'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+
+SET search_path = "hurd-i386_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 'hurd-i386'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+
+SET search_path = "i386_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 'i386'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+
+SET search_path = "ia64_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 'ia64'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+
+SET search_path = "kfreebsd-amd64_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 'kfreebsd-amd64'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+
+SET search_path = "kfreebsd-i386_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 'kfreebsd-i386'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+
+SET search_path = "mips_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 'mips'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+
+SET search_path = "mipsel_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 'mipsel'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+
+SET search_path = "powerpc_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 'powerpc'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+
+SET search_path = "s390_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 's390'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+
+SET search_path = "sparc_public", public;
+
+DROP VIEW pkg_history;
+
+CREATE OR REPLACE VIEW pkg_history AS
+ SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space
+ FROM pkg_history
+NATURAL JOIN distributions
+ WHERE distributions.public = true AND pkg_history.architecture::text = 'sparc'::text;
+
+GRANT ALL ON TABLE pkg_history TO wbadm;
+GRANT SELECT ON TABLE pkg_history TO PUBLIC;
+