Insert multiple rows in single query wrapped in Rails magic?

Hello all,

I’m trying to create a number of records in a single table using only a
single SQL query (to reduce otherwise sizeable communication overhead).

I’m using Postgres, which, like some other databases, allows me to do
this in plain SQL as:

INSERT INTO products (product_no, name, price) VALUES
(1, ’Cheese’, 9.99),
(2, ’Bread’, 1.99),
(3, ’Milk’, 2.99);

Is there a clever trick to wrapping this in Rails without manually
fetching sequence values and constructing my own SQL strings?

I’ve looked into passing Products.create() an array of hashes, but the
Rails code just iterates over the products, creating each in turn.
Besides, for security, I’ve disabled the setting of some attributes
through hash-mapping, and it’s these attributes I want to initialise in
the records I’m creating.

Thanks, Nat