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

Unable to sort by a date field at PostgreSQL - CAST() problem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.8.6, 1.9.1
    • 1.8.3, 1.9
    • None
    • Reported at PostgreSQL 8.0
    • PostgreSQL
    • MOODLE_18_STABLE, MOODLE_19_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

      See mod/data/field/date/field.class.php :

      function get_sort_sql($fieldname) {
      return 'CAST('.$fieldname.' AS unsigned)';
      }

      This causes problem at PostgreSQL as there is no such type "unsigned": ERROR: type "unsigned" does not exist. Note that CAST() is SQL standard but the target datatype has to be known for the SQL environement.

      No records are displayed.

      Assigning this to myself as a part of my Bugathon run.

            stronk7 Eloy Lafuente (stronk7)
            mudrd8mz David Mudrák (@mudrd8mz)
            David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.