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

Select statement causes "Warning" messages on postgres

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.3, 2.1.1, 2.2
    • 2.0.5, 2.1.2
    • SLES 11 SP1
      Moodle 2.0.2+ (Build: 20110413)
      Postgres 8.3.11
      Apache 5.2.14
    • PostgreSQL
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • w31_MDL-27685_m22_pglike
    • Hide

      The select statement is locate in file "moodle\lib\dml\pgsql_native_moodle_database.php" on function get_tables($usecache=true).
      To solve the warning messages change line "$prefix = str_replace('_', '\\\\_', $this->prefix);" to "$prefix = $this->prefix;"

      I don't know if changing that line could cause others problems

      Show
      The select statement is locate in file "moodle\lib\dml\pgsql_native_moodle_database.php" on function get_tables($usecache=true). To solve the warning messages change line "$prefix = str_replace('_', '\\\\_', $this->prefix);" to "$prefix = $this->prefix;" I don't know if changing that line could cause others problems
    • Hide

      no testing should be necessary because this is an obvious bug

      Show
      no testing should be necessary because this is an obvious bug

    Description

      Acessing the page "Site Administration"/"Notifications" generate the following messages on postgres log:

      WARNING: nonstandard use of \ \ in a string literal at character 107
      HINT: Use the escape string syntax for backslashes, e.g., E'\ \'.

      The select statement reported on postgres log is:
      SELECT table_name FROM information_schema.tables WHERE table_name LIKE 'mdl_%' AND table_type IN ('BASE TABLE', 'LOCAL TEMPORARY')

      Replication instructions:

      1. Just access "Notification" page while watching the postgres log

      Attachments

        Issue Links

          Activity

            People

              skodak Petr Skoda
              titofr Sergio Tito
              Sam Hemelryk Sam Hemelryk
              Aparup Banerjee Aparup Banerjee
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Oct/11