Fix backends query for postgres 9.2