Teresa Gibson found an error while testing the user activity reports in Moodle 2.0 that appears to be related to the use of hard coded CONCAT within the log_display table when using a pg database.
The first patch I've attached fixes this issue within Moodle 2.0 and seems fine.
The second patch attempts to fix this issue within 1.9 however it hasn't dealt with the install.xml file yet which contains these entries.
The solution I have used for all other fixes here is to simply replace the CONCAT with the result of the proper sql_concat functions in each version, however because of install.xml perhaps this needs to be fixed in a better way.
As I'm no expert on either the install of the logging I'll leave that up to the expert who gets assigned this issue
I've also marked this as a blocker as it is now holding up the QA tests