[Koha-bugs] [Bug 8164] New: Replace IFNULL() with COALESCE() in all database calls

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue May 29 22:02:27 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8164

          Priority: P5 - low
 Change sponsored?: ---
            Bug ID: 8164
          Assignee: gmcharlt at gmail.com
            Blocks: 7365
           Summary: Replace IFNULL() with COALESCE() in all database calls
          Severity: enhancement
    Classification: Unclassified
                OS: All
          Reporter: koha.sekjal at gmail.com
          Hardware: All
            Status: NEW
           Version: master
         Component: Architecture, internals, and plumbing
           Product: Koha

Koha uses IFNULL() in 5 places in it's SQL; this is not standard SQL, and isn't
compatible with all databases.  The COALESCE() function is supported by:

    DB2:
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/topic/com.ibm.db2.doc.sqlref/fcoal.htm
    Microsoft SQL Server: http://msdn.microsoft.com/en-us/library/aa258244.aspx
    MySQL:
http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html#function_ifnull
    Oracle:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/functions023.htm
    PostgreSQL:
http://www.postgresql.org/docs/8.1/static/functions-conditional.html#AEN12656
and
    SQLite: http://www.sqlite.org/lang_corefunc.html

And probably others (from
http://www.nomadjourney.com/2009/04/database-independent-django-queries-coalesce/)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list