I know that you can create an index in a field in the hstore column. I know that you can also create a GIN index in an array column.
But what is the syntax for creating an index in an hstore array?
eg.
CREATE TABLE customer (
pk serial PRIMARY KEY,
customer hstore,
customer_purchases hstore[]
);
Say a buyer buying an hstore might be a hash, for example
productId -> 1
price -> 9.99
and I have an array of those in the store customer_purchases []
I want to create an index for customer.customer_purchases [] → productId
Is it possible? I tried different combinations of CREATE INDEX syntaxes, and none of them seem to support indexing fields in an hstore array.
source
share