DB error on Postgre #82

Open
opened 2024-10-28 22:25:09 +01:00 by vldovhan · 0 comments

Hello,
please review SQL queries and retest the plugin on Postgre, as I received an SQL exceptions during testing:

image

ERROR: operator does not exist: bigint = character varying
LINE 4: ...JOIN m_competency_coursecomp cc on cc.competencyid = p.value
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
SELECT DISTINCT b.id from m_badge b
INNER JOIN m_badge_criteria crit ON b.id = crit.badgeid
INNER JOIN m_badge_criteria_param p on p.critid = crit.id
INNER JOIN m_competency_coursecomp cc on cc.competencyid = p.value
WHERE cc.courseid = $1 AND crit.criteriatype = $2
[array (
0 => 4,
1 => 9,
)]
Error code: dmlreadexception

  • line 494 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
  • line 358 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->read_slave_query_end()
  • line 1087 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
  • line 821 of /local/treestudyplan/classes/badgeinfo.php: call to pgsql_native_moodle_database->get_fieldset_sql()
  • line 889 of /local/treestudyplan/classes/badgeinfo.php: call to local_treestudyplan\badgeinfo::find_badges_by_course_relation()
  • line 1016 of /local/treestudyplan/classes/studyplanservice.php: call to local_treestudyplan\badgeinfo::find_page_related_badges()
  • line ? of unknownfile: call to local_treestudyplan\studyplanservice::search_related_badges()
  • line 253 of /lib/external/classes/external_api.php: call to call_user_func_array()
Hello, please review SQL queries and retest the plugin on Postgre, as I received an SQL exceptions during testing: ![image](/attachments/24b1e683-ecbb-4087-ac47-b17612e8924b) ERROR: operator does not exist: bigint = character varying LINE 4: ...JOIN m_competency_coursecomp cc on cc.competencyid = p.value ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts. SELECT DISTINCT b.id from m_badge b INNER JOIN m_badge_criteria crit ON b.id = crit.badgeid INNER JOIN m_badge_criteria_param p on p.critid = crit.id INNER JOIN m_competency_coursecomp cc on cc.competencyid = p.value WHERE cc.courseid = $1 AND crit.criteriatype = $2 [array ( 0 => 4, 1 => 9, )] Error code: dmlreadexception * line 494 of /lib/dml/moodle_database.php: dml_read_exception thrown * line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end() * line 358 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->read_slave_query_end() * line 1087 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end() * line 821 of /local/treestudyplan/classes/badgeinfo.php: call to pgsql_native_moodle_database->get_fieldset_sql() * line 889 of /local/treestudyplan/classes/badgeinfo.php: call to local_treestudyplan\badgeinfo::find_badges_by_course_relation() * line 1016 of /local/treestudyplan/classes/studyplanservice.php: call to local_treestudyplan\badgeinfo::find_page_related_badges() * line ? of unknownfile: call to local_treestudyplan\studyplanservice::search_related_badges() * line 253 of /lib/external/classes/external_api.php: call to call_user_func_array()
104 KiB
pmkuipers self-assigned this 2024-10-29 09:19:56 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Miqra-Engineering/moodle_local_treestudyplan#82
No description provided.