[Blends-commit] r2987 - in /blends/trunk/team_analysis_tools: archives.sql author_stats_helper.py get-archive-pages

tille at users.alioth.debian.org tille at users.alioth.debian.org
Tue Oct 25 06:18:59 UTC 2011


Author: tille
Date: Tue Oct 25 06:18:58 2011
New Revision: 2987

URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=2987
Log:
Grant execute permissions on functions which became necessary since PG 9.1

Modified:
    blends/trunk/team_analysis_tools/archives.sql
    blends/trunk/team_analysis_tools/author_stats_helper.py
    blends/trunk/team_analysis_tools/get-archive-pages

Modified: blends/trunk/team_analysis_tools/archives.sql
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/archives.sql?rev=2987&op=diff
==============================================================================
--- blends/trunk/team_analysis_tools/archives.sql (original)
+++ blends/trunk/team_analysis_tools/archives.sql Tue Oct 25 06:18:58 2011
@@ -15,6 +15,8 @@
    ts        date
 );
 
+GRANT SELECT ON listarchive TO guest;
+
 -- top N authors of mailing list
 CREATE OR REPLACE FUNCTION author_names_of_list(text,int) RETURNS SETOF RECORD AS $$
   SELECT author FROM (
@@ -26,6 +28,8 @@
       LIMIT $2
   ) tmp
 $$ LANGUAGE 'SQL';
+
+GRANT EXECUTE ON FUNCTION author_names_of_list(text,int) TO guest;
 
 /*
 SELECT * FROM author_names_of_list('med', 12) AS (category text) ;
@@ -42,6 +46,8 @@
   GROUP BY author, year
   ORDER BY year, count DESC, author
 $$ LANGUAGE 'SQL';
+
+GRANT EXECUTE ON FUNCTION author_per_year_of_list(text,int) TO guest;
 
 /*
 SELECT * FROM author_per_year_of_list('med', 12) AS (author text, year int, value int) ;

Modified: blends/trunk/team_analysis_tools/author_stats_helper.py
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/author_stats_helper.py?rev=2987&op=diff
==============================================================================
--- blends/trunk/team_analysis_tools/author_stats_helper.py (original)
+++ blends/trunk/team_analysis_tools/author_stats_helper.py Tue Oct 25 06:18:58 2011
@@ -58,7 +58,11 @@
 
 query = "SELECT replace(author,' ','_') AS author FROM author_names_of_list('%s', %i) AS (author text);" % (project, NMAX)
 # print query
-curs.execute(query)
+try:
+    curs.execute(query)
+except psycopg2.ProgrammingError, err:
+    print >>stderr, str(err) + "\n" + query
+    exit()
 
 print ' year',
 nuploaders = 0

Modified: blends/trunk/team_analysis_tools/get-archive-pages
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/get-archive-pages?rev=2987&op=diff
==============================================================================
--- blends/trunk/team_analysis_tools/get-archive-pages (original)
+++ blends/trunk/team_analysis_tools/get-archive-pages Tue Oct 25 06:18:58 2011
@@ -34,6 +34,7 @@
 		'jr',
                 'kde',
                 'kernel',
+                'qa',
                 'l10n-german',
                 'laptop',
                 'legal',




More information about the Blends-commit mailing list