hstore problem with UNION?

From: Ivan Voras <ivoras(at)freebsd(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: hstore problem with UNION?
Date: 2010-05-10 11:40:49
Message-ID: hs8rc1$qmg$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Geoffrey 2010-05-10 11:58:28 Re: Documentation availability as a single page of text
Previous Message Alban Hertroys 2010-05-10 10:29:14 Re: question about unique indexes