Postgresql Arrays

Hi,

I was wondering if anyone knows how ActiveRecord deals with Postgresql
arrays? Specifically I am trying to figure out how to:
a) Setup migration that creates the following table:

CREATE TABLE sal_emp (
name text,
pay_by_quarter integer[]
);

b) insert records into this table through activerecord like
SalEmp.create({:name => “Tom”, :pay_by_quarter => [1,2,3]})
Is this even possible?

Thanks,

Ram

On Tue, 2008-06-03 at 07:46 -0400, Ram R. wrote:

b) insert records into this table through activerecord like
SalEmp.create({:name => “Tom”, :pay_by_quarter => [1,2,3]})
Is this even possible?


You could serialize the array and save the serialized array as a string
in the database and then break the array apart…all as part of the
model.

Craig