I've encountered the following problem:
ivoras=# create table htest2(id integer, t hstore);
CREATE TABLE
ivoras=# create table htest3(id integer, t2 hstore);
CREATE TABLE
ivoras=# select id, t from htest2 union select id,t2 as t from htest3;
ERROR: could not identify an ordering operator for type hstore
HINT: Use an explicit ordering operator or modify the query.
I think it has something to do with UNION being the type of operation
that could, as a variation, include DISTINCT, which would require
sorting, but still... UNION by itself doesn't.
How to get around this? I really don't care how hstores get sorted and
more, would like to avoid sorting them at all as they could get big.