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

DB: set an integer field as 'false' in postgres

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Hi Eloy, I have a postgres related issue: MDL-24022

      I do a simple $DB->get_records
      one of my param/field is an integer
      with Mysql I pass false and it works
      with Postgres I pass false and I have this error message:
      ERROR: invalid input syntax for integer: ""
      Then I pass 0 with postgres and it works

      Do we expect false to be automatically converted into 0 to work with Postgres? It seems to me it should be done by DDL/DML, but not 100% sure (specially I guess this kind of "bug" would already have been caught)

      Thanks

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              jerome Jérôme Mouneyrac
              Tester:
              Nobody
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10