SpecialAbuseLog does three "LEFT JOIN"s on "af_id=afl_filter" with af_id being INTEGER and afl_filter being TEXT. These fail on PostgreSQL.
MySQL is very forgiving on such joins and for example matches 4711 with "4711 mysql sucks", but PostgreSQL does not. For AbuseFilter, afl_filter seems to be either a reference to af_id or a reference to af_id with "global-" prepended, so there shouldn't be a need for complete imitation. There is no explanation for this data model which must make JOINs even on MySQL very expensive and the needed storage unnecessarily huge.
Short term solution would be something like "wfGetDB( DB_MASTER )->getType() == 'mysql' ? 'af_id=afl_filter' : 'af_id::TEXT=afl_filter'" (not the other way round as that fails on non-convertable strings), proper way would be of course to split afl_filter into afl_filter_id and afl_filter_global or similar and let the database do what it's best at.