I would like to create a unique index or constraint on a specific keys in an hstore column if that key exists. I was hoping the answer would be found somewhere in this other question:
Practical limitations of expression indexes in PostgreSQL
But I tried every version of the syntax I could come up with and nothing would work.
currently, my table is
hstore_table
the hstore field is hstore_value
and they keys I would like to force to be unique are 'foo' and 'bar' when they exist.
My version of PostgreSQL is 8.4.13