[Blends-commit] r2988 - /blends/trunk/team_analysis_tools/author_stats_helper.py
tille at users.alioth.debian.org
tille at users.alioth.debian.org
Tue Oct 25 07:10:27 UTC 2011
Author: tille
Date: Tue Oct 25 07:10:26 2011
New Revision: 2988
URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=2988
Log:
Other mechanism to install contrib extensions in PG 9.1
Modified:
blends/trunk/team_analysis_tools/author_stats_helper.py
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=2988&op=diff
==============================================================================
--- blends/trunk/team_analysis_tools/author_stats_helper.py (original)
+++ blends/trunk/team_analysis_tools/author_stats_helper.py Tue Oct 25 07:10:26 2011
@@ -75,7 +75,7 @@
for i in range(nuploaders):
typestring = typestring + ', upl' + str(i+1) + ' int'
query = """SELECT *
- FROM
+ FROM
crosstab(
'SELECT year AS row_name, name AS bucket, count AS value
FROM author_per_year_of_list(''%s'', %i) AS (name text, year int, count int)',
@@ -89,9 +89,11 @@
curs.execute(query)
except psycopg2.ProgrammingError, err:
if crosstab_missing_re.match(str(err)):
- print >>stderr, """Please do
- psql udd < /usr/share/postgresql/<pgversion>/contrib/tablefunc.sql
-before calling this program."""
+# print >>stderr, """Please do
+# psql udd < /usr/share/postgresql/<pgversion>/contrib/tablefunc.sql
+#before calling this program."""
+ print >>stderr, "Please do `psql udd -c 'CREATE EXTENSION tablefunc;'` before calling this program."
+ print >>stderr, err
else:
print >>stderr, "To few authors in %s list.\n%s" % (project, err)
exit(-1)
More information about the Blends-commit
mailing list