Moodle

pgsql does not support bound queries in field default values

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major 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

nice one! pg does not support $1 when defining field defaults
solution:

  • do not allow [$:?] in field defaults (and enums maybe too) - there is only one in timezone table "00:00"
  • report and wait
  • emulate bound query params - grrrr

Activity

Hide
Petr Škoda (skodak) added a comment -

I might have better solution, going to hack pg $DB->execute() so that it detects table modifications and emulates bound queries..

Show
Petr Škoda (skodak) added a comment - I might have better solution, going to hack pg $DB->execute() so that it detects table modifications and emulates bound queries..
Hide
Petr Škoda (skodak) added a comment -

workaround in patch

Show
Petr Škoda (skodak) added a comment - workaround in patch
Hide
Eloy Lafuente (stronk7) added a comment -

I guess this was fixed by avoiding bounds in DDL stuff correct? As we discussed in chat (long execute.... named function). Or not?

Show
Eloy Lafuente (stronk7) added a comment - I guess this was fixed by avoiding bounds in DDL stuff correct? As we discussed in chat (long execute.... named function). Or not?
Hide
Petr Škoda (skodak) added a comment -

bound params avoided in ddl

Show
Petr Škoda (skodak) added a comment - bound params avoided in ddl

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: