fix query with multiple parameters with postgresql

Hi, I found a problem while doing queries with multiple parameters in postgresql, the query builder didn't replace all question marks with the corresponding code. I think it's only the matter of using the global setting for the regexp.
tested with postgresql and sqlite3