fix failure in running multiple parameter query in postgresql