Fixed sql query format
sqlite and postgresql have incompatible wildcard parameters. sqlite uses question marks whereas postgresql requires c style parameters (%s
). The tests require some more fine tuning of the testing infrastructure to provide an postgresql database at test time.