Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-13823

Changes on Postgres 8.3 turn some queries incompatible with moodle.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.6.6, 1.7.4, 1.8.5, 1.9
    • Fix Version/s: 1.8.6, 1.9.1
    • Component/s: Administration, Course
    • Labels:
      None
    • Environment:
      Only with Postgres 8.3
    • Database:
      PostgreSQL
    • Affected Branches:
      MOODLE_15_STABLE, MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      In the new version of PostgreSql (8.3) the string concatenation operator (||) only accepts non-string input if at least one input is of a string type.

      An example where the error occurs:
      Moodle v.1.8:
      '/course/report/stats/report.php' at the line 90

      This error occurs:
      'ERROR: operator does not exist: bigint || bigint'

      See the first note in this document:
      http://www.postgresql.org/docs/8.3/static/functions-string.html#FUNCTIONS-STRING-SQL

      Note: Before PostgreSQL 8.3, these functions would silently accept values of several non-string data types as well, due to the presence of implicit coercions from those data types to text. Those coercions have been removed because they frequently caused surprising behaviors. However, the string concatenation operator (||) still accepts non-string input, so long as at least one input is of a string type, as shown in Table 9-5. For other cases, insert an explicit coercion to text if you need to duplicate the previous behavior.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/May/08