#!/usr/bin/env python
# coding=utf8
-# Debian Archive Kit Database Update Script
+""" Database Update Script - debversion """
# Copyright © 2008 Michael Casadevall <mcasadevall@debian.org>
# Copyright © 2008 Roger Leigh <rleigh@debian.org>
################################################################################
def do_update(self):
+vvvvvvvvvvvvvvvvvvvv
print "Note: to be able to enable the the PL/Perl (plperl) procedural language, we do"
print "need postgresql-plperl-$postgres-version installed. Make sure that this is the"
print "case before you continue. Interrupt if it isn't, sleeping 5 seconds now."
print "(We need to be database superuser for this to work!)"
time.sleep (5)
+^^^^^^^^^^^^^^^^^^^^
try:
c = self.db.cursor()
print "Enabling PL/Perl language"
+ c.execute("CREATE LANGUAGE plperl;")
c.execute("CREATE LANGUAGE plpgsql;")
print "Adding debversion type to database."