From 444801e11bbd37c88817d1fcca07d47bf9d08742 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 19 Oct 2010 12:55:02 +0300 Subject: [PATCH] Adding patch from Toni Mueller to fix SQL for postgresql 8.4 (Closes: #568119). bzr revid: p_christ@hol.gr-20101019095502-z3qzefpofohdy6tt --- debian/patches/05-postgresql-8.4.patch | 15 +++++++++++++++ debian/patches/series | 1 + 2 files changed, 16 insertions(+) create mode 100644 debian/patches/05-postgresql-8.4.patch diff --git a/debian/patches/05-postgresql-8.4.patch b/debian/patches/05-postgresql-8.4.patch new file mode 100644 index 00000000000..338e64b5f8d --- /dev/null +++ b/debian/patches/05-postgresql-8.4.patch @@ -0,0 +1,15 @@ +Author: Toni Mueller +Description: Fixes SQL for postgresql 8.4 (Closes: #568119). + +diff -Naurp openerp-server.orig/bin/service/web_services.py openerp-server/bin/service/web_services.py +--- openerp-server.orig/bin/service/web_services.py 2009-11-27 17:41:16.000000000 +0100 ++++ openerp-server/bin/service/web_services.py 2010-02-06 10:18:46.000000000 +0100 +@@ -75,7 +75,7 @@ class db(netsvc.Service): + cr = db.serialized_cursor() + try: + cr.autocommit(True) # XXX inhibit the effect of a serialized cursor. is it what we want ? +- cr.execute('CREATE DATABASE "%s" ENCODING \'unicode\'' % db_name) ++ cr.execute('CREATE DATABASE "%s" ENCODING \'unicode\' TEMPLATE template0' % db_name) + finally: + cr.close() + sql_db.close_db('template1') diff --git a/debian/patches/series b/debian/patches/series index 6d5ba4c38b4..92ac0d98c87 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 01-autobuild.patch 02-migrate.patch 03-shebang.patch +05-postgresql-8.4.patch