https://dockyard.com/blog/ruby/2012/09/18/rails-4-sneak-peek-postgresql-array-support
二维数组必须每组数量一致, 可以缺值用nil代替
# postgres array中只能存square array, 缺值用nil替代
max_count = origin_ids.map{|item| item.size}.max
origin_ids.map{|item| item + Array.new(max_count - item.size, nil)}