Univention Bugzilla – Attachment 9460 Details for
Bug 46575
pykota postgresql handling broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
python-pygresql-stuff.patch
python-pygresql-stuff.patch (text/plain), 2.21 KB, created by
Felix Botner
on 2018-03-09 17:16 CET
(
hide
)
Description:
python-pygresql-stuff.patch
Filename:
MIME Type:
Creator:
Felix Botner
Created:
2018-03-09 17:16 CET
Size:
2.21 KB
patch
obsolete
>diff -Nur pykota-1.27.0.o/initscripts/postgresql/pykota-postgresql.sql pykota-1.27.0/initscripts/postgresql/pykota-postgresql.sql >--- pykota-1.27.0.o/initscripts/postgresql/pykota-postgresql.sql 2018-03-09 17:12:13.942141000 +0100 >+++ pykota-1.27.0/initscripts/postgresql/pykota-postgresql.sql 2018-03-09 16:43:54.802141000 +0100 >@@ -30,14 +30,14 @@ > -- > -- Create the print quota database > -- >-CREATE DATABASE pykota WITH ENCODING='UTF-8'; >+CREATE DATABASE pykota WITH TEMPLATE=template0 ENCODING='UTF-8'; > > -- > -- Create the print quota database users > -- NOTE: Change the password values to the passwords you would like. > -- >-CREATE USER pykotauser WITH UNENCRYPTED PASSWORD 'readonlypw' NOCREATEDB NOCREATEUSER; >-CREATE USER pykotaadmin WITH UNENCRYPTED PASSWORD 'readwritepw' NOCREATEDB NOCREATEUSER; >+CREATE USER pykotauser WITH UNENCRYPTED PASSWORD 'readonlypw' NOCREATEDB; >+CREATE USER pykotaadmin WITH UNENCRYPTED PASSWORD 'readwritepw' NOCREATEDB; > > -- > -- Now connect to the new database >diff -Nur pykota-1.27.0.o/pykota/storages/pgstorage.py pykota-1.27.0/pykota/storages/pgstorage.py >--- pykota-1.27.0.o/pykota/storages/pgstorage.py 2018-03-09 17:12:13.978141000 +0100 >+++ pykota-1.27.0/pykota/storages/pgstorage.py 2018-03-09 15:48:33.000000000 +0100 >@@ -60,10 +60,6 @@ > raise PGError, msg > self.closed = 0 > try : >- self.quote = self.database._quote >- except AttributeError : # pg <v4.x >- self.quote = pg._quote >- try : > self.database.query("SET CLIENT_ENCODING TO 'UTF-8';") > except PGError, msg : > self.tool.logdebug("Impossible to set database client encoding to UTF-8 : %s" % msg) >@@ -137,15 +133,7 @@ > > def doQuote(self, field) : > """Quotes a field for use as a string in SQL queries.""" >- if type(field) == type(0.0) : >- typ = "decimal" >- elif type(field) == type(0) : >- typ = "int" >- elif type(field) == type(0L) : >- typ = "int" >- else : >- typ = "text" >- return self.quote(field, typ) >+ return self.database.adapter.adapt_inline(field) > > def prepareRawResult(self, result) : > """Prepares a raw result by including the headers."""
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 46575
: 9460 |
9461