[Mpuls-commits] r744 - in waska/trunk: . waskaweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Jan 8 10:54:24 CET 2010


Author: frank
Date: 2010-01-08 10:54:23 +0100 (Fri, 08 Jan 2010)
New Revision: 744

Modified:
   waska/trunk/ChangeLog.txt
   waska/trunk/waskaweb/model/appointment.py
   waska/trunk/waskaweb/model/phases_factory.py
Log:
Add explicit casts to queries for compatibility with PostgreSQL 8.3


Modified: waska/trunk/ChangeLog.txt
===================================================================
--- waska/trunk/ChangeLog.txt	2010-01-08 09:34:50 UTC (rev 743)
+++ waska/trunk/ChangeLog.txt	2010-01-08 09:54:23 UTC (rev 744)
@@ -1,3 +1,8 @@
+2010-01-08 	Frank Koormann <frank.koormann at intevation.de>
+
+	* waskaweb/model/appointment.py, waskaweb/model/phases_factory.py:
+	Add explicit casts to queries for compatibility with PostgreSQL 8.3
+
 2009-12-10 	Torsten Irlaender  <torsten.irlaender at intevation.de>
 
 	Backported patch for issue559 WASKO

Modified: waska/trunk/waskaweb/model/appointment.py
===================================================================
--- waska/trunk/waskaweb/model/appointment.py	2010-01-08 09:34:50 UTC (rev 743)
+++ waska/trunk/waskaweb/model/appointment.py	2010-01-08 09:54:23 UTC (rev 744)
@@ -55,7 +55,7 @@
                                 WHERE id = %(id)s"
 
 GET_CASE_APPOINTMENT_SQL = "SELECT id, master_id, sdatum, edatum, name, beschreibung, art FROM ka_fall_termine_tbl_view WHERE id = %(id)s"
-GET_CASE_APPOINTMENTLIST_SQL = "SELECT id, master_id, sdatum, edatum, name, beschreibung, art FROM ka_fall_termine_tbl_view WHERE master_id = %(id)s AND coalesce(edatum, sdatum)::date+1 >= %(date)s AND art = 0 ORDER BY sdatum"
+GET_CASE_APPOINTMENTLIST_SQL = "SELECT id, master_id, sdatum, edatum, name, beschreibung, art FROM ka_fall_termine_tbl_view WHERE master_id = %(id)s AND coalesce(edatum, sdatum)::date+1 >= %(date)s::date AND art = 0 ORDER BY sdatum"
 GET_CASE_REMINDERLIST_SQL = "SELECT id, master_id, sdatum, edatum, name, beschreibung, art FROM ka_fall_termine_tbl_view WHERE master_id = %(id)s AND art = 1 ORDER BY sdatum"
 GET_ALLCASES_APPOINTMENTLIST_SQL = "SELECT a.id, a.master_id, a.sdatum, a.edatum, a.name, a.beschreibung, a.art FROM ka_fall_termine_tbl_view a JOIN master_tbl_view m ON m.id = a.master_id WHERE coalesce(edatum, sdatum)::date+1 >= %(date)s AND art = 0 AND m.bearbeiter_id = %(editor)s ORDER BY sdatum"
 GET_ALLCASES_REMINDERLIST_SQL = "SELECT a.id, a.master_id, a.sdatum, a.edatum, a.name, a.beschreibung, a.art FROM ka_fall_termine_tbl_view a JOIN master_tbl_view m ON m.id = a.master_id WHERE art = 1 AND m.bearbeiter_id = %(editor)s ORDER BY sdatum"

Modified: waska/trunk/waskaweb/model/phases_factory.py
===================================================================
--- waska/trunk/waskaweb/model/phases_factory.py	2010-01-08 09:34:50 UTC (rev 743)
+++ waska/trunk/waskaweb/model/phases_factory.py	2010-01-08 09:54:23 UTC (rev 744)
@@ -37,13 +37,13 @@
 IS_FILLED = \
 """(%(name)s IS NOT NULL
     AND (get_default_value('master_tbl', '%(name)s') IS NULL
-        OR %(name)s != get_default_value('master_tbl', '%(name)s')))
+        OR %(name)s::text != get_default_value('master_tbl', '%(name)s')))
 """
 
 IS_NOT_FILLED = \
 """(NOT (%(name)s IS NOT NULL
     AND (get_default_value('master_tbl', '%(name)s') IS NULL
-        OR %(name)s != get_default_value('master_tbl', '%(name)s'))))
+        OR %(name)s::text != get_default_value('master_tbl', '%(name)s'))))
 """
 
 SELECT = \



More information about the Mpuls-commits mailing list