Re: [HACKERS] _text problem in union

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zakkr <zakkr(at)zf(dot)jcu(dot)cz>
Cc: pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] _text problem in union
Date: 1999-09-27 23:30:51
Message-ID: 27907.938475051@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zakkr <zakkr(at)zf(dot)jcu(dot)cz> writes:
> abil=> select '{"aaa"}'::_text union select '{"bbb"}'::_text;
> ERROR: Unable to identify an ordering operator '<' for type '_text'
> Use an explicit ordering operator or modify the query

Depending on what you're trying to do, UNION ALL might be an adequate
workaround. UNION is defined to remove duplicates, so it has to sort
the results of the union'ed queries, which requires an ordering
operator. UNION ALL just appends the two query results together...

In the long run we probably ought to think about providing ordering
operators for array types.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-09-27 23:35:40 Re: [HACKERS] Re: New init script and upgrade attempt: failed
Previous Message Tom Lane 1999-09-27 22:50:08 Re: [HACKERS] vacuum process size