How to pass multiple values in an sql query in postgres?

You can use a variable for each value.

VALUES ($1, $2, $3)

Or, you could switch to string interpolation if you’re dynamically building the SQL. Make sure you’re not affected by possible SQL-injection though.

sql = " ... VALUES (#{normalized_values(values)})"

normalized_values is where you loop through your values and apply quotes etc. for SQL.