-
Bug
-
Resolution: Fixed
-
Low
-
None
-
MDLSITE-3530_postgres
This is almost certainly a postgres error. Postgres is more strict than mysql so this isn't an urgent fix but it would be nice to work under the more strict database.
Debug info: ERROR: function sum(boolean) does not exist
LINE 1: ...countrycode as country, COUNT('x') AS totalcount, SUM(privac...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
SELECT r.countrycode as country, COUNT('x') AS totalcount, SUM(privacy = 'named' or privacy = 'linked') AS publiccount
FROM mdl_registry r
WHERE r.timeregistered > 0 AND
r.timeregistered < $1 AND
r.confirmed = 1 AND
(r.unreachable <= $2 OR r.override BETWEEN 1 AND 3)
GROUP BY r.countrycode
HAVING (COUNT('x')) > 0
ORDER BY (COUNT('x')) DESC
[array (
0 => 1412118000,
1 => 2,
)]
Error code: dmlreadexception
Stack trace:
line 443 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 244 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
line 764 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 21 of /local/moodleorg/top/sites/siteslib.php: call to pgsql_native_moodle_database->get_records_sql()
line 12 of /local/moodleorg/top/sites/index.php: call to get_combined_country_info()
- Discovered while testing
-
MDLSITE-3492 Upgrade branch moodle.org-2.7-local_moodleorg-addon
-
- Resolved
-
- has a non-specific relationship to
-
MDLSITE-3780 Improve ip country detection (especially make it work for ipv6 users)
-
- Closed
-
- will help resolve
-
MDLSITE-3766 /sites/ page doesn't show when accesed using ipv6
-
- Closed
-