I\'m trying to query hstore for all the values of a certain key that match a search criteria.
I can get all the values for a certain key like this:
SELE
One caveat to willglynn's answer for anyone seeing this in the future -- the original query and the new query have slightly different behavior. Namely,
SELECT data->'Supplier' AS sup
FROM products;
will include a NULL value assuming at least one row doesn't have an assignment for Supplier.
SELECT DISTINCT
svals(slice(data, ARRAY['Supplier']))
FROM "products"
will not return the NULL value.