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

Select statement causes "Warning" messages on postgres

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Labels:
    • Environment:
      SLES 11 SP1
      Moodle 2.0.2+ (Build: 20110413)
      Postgres 8.3.11
      Apache 5.2.14
    • Database:
      PostgreSQL
    • Testing Instructions:
      Hide

      no testing should be necessary because this is an obvious bug

      Show
      no testing should be necessary because this is an obvious bug
    • Workaround:
      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
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w31_MDL-27685_m22_pglike

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Oct/11