0
與數據庫列遷移這樣的:是否有可能使用Rails 4查詢postgres數組的特定索引?
add_column :documents, :array_column, :string, array: true
我知道這是可能做到這一點查詢數組中的任何元素:
Document.where("'foo' = ANY (array_column)")
我的問題是我是否能具體查詢第二個(或任何其他單個)元素的數組?