Bug fix for SQL parameter replacing function.
It will not handle Postgres casting operations correctly (::datatype) and won't try to replace them with parameters