I'm using MediaWiki 1.11.0 with PostgresQL 8.2.5 on FreeBSD 7. Everything's working fine so far except that I'm getting the following ouput when I try to revert the version of an image or delete (out of desperation) the whole file.

Please note that I've already patched includes/DifferenceEngine.php to

Code:
$db = wfGetDB( DB_SLAVE );
$change = RecentChange::newFromConds(
		array(
				// Add redundant timestamp condition so we can use the
				// existing index
				//'rc_timestamp' => $this->mNewRev->getTimestamp(),
				'rc_timestamp' => $db->timestamp( $this->mNewRev->getTimestamp() ),
				'rc_this_oldid' => $this->mNewid,
				'rc_last_oldid' => $this->mOldid,
				'rc_patrolled' => 0,
And here's the error:

Code:
A database error has occurred Query: INSERT INTO filearchive (fa_storage_group,fa_storage_key,fa_deleted_user,fa_deleted_timestamp,fa_deleted_reason,fa_deleted,fa_name,fa_archive_name,fa_size,fa_width,fa_height,fa_metadata,fa_bits,fa_media_type,fa_major_mime,fa_minor_mime,fa_description,fa_user,fa_user_text,fa_timestamp) SELECT 'deleted',IF(img_sha1='', '', CONCAT(img_sha1,'.gif')),'1','2008-01-11 13:34:54 GMT','',0,img_name,NULL,img_size,img_width,img_height,img_metadata,img_bits,img_media_type,img_major_mime,img_minor_mime,img_description,img_user,img_user_text,img_timestamp FROM image WHERE img_name = 'Logo_jge.gif' Function: LocalFileDeleteBatch::doDBInserts Error: 1 ERROR: function concat(text, "unknown") does not exist LINE 1: ..._timestamp) SELECT 'deleted',IF(img_sha1='', '', CONCAT(img... ^ HINT: No function matches the given name and argument types. You may need to add explicit type casts.

Backtrace:

#0 /usr/local/www/mediawiki/includes/Database.php(779): DatabasePostgres->reportQueryError('ERROR: functio...', 1, 'INSERT INTO fi...', 'LocalFileDelete...', false)
#1 /usr/local/www/mediawiki/includes/Database.php(1845): Database->query('INSERT INTO fi...', 'LocalFileDelete...')
#2 /usr/local/www/mediawiki/includes/filerepo/LocalFile.php(1216): Database->insertSelect('filearchive', 'image', Array, Array, 'LocalFileDelete...')
#3 /usr/local/www/mediawiki/includes/filerepo/LocalFile.php(1297): LocalFileDeleteBatch->doDBInserts()
#4 /usr/local/www/mediawiki/includes/filerepo/LocalFile.php(873): LocalFileDeleteBatch->execute()
#5 /usr/local/www/mediawiki/includes/FileDeleteForm.php(75): LocalFile->delete('')
#6 /usr/local/www/mediawiki/includes/ImagePage.php(491): FileDeleteForm->execute()
#7 /usr/local/www/mediawiki/includes/Wiki.php(397): ImagePage->delete()
#8 /usr/local/www/mediawiki/includes/Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(ImagePage), Object(Title), Object(User), Object(WebRequest))
#9 /usr/local/www/mediawiki/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
#10 {main}
Any suggestions?