[ticket/12639] Fix tests on postgres

PHPBB3-12639