Juhan-Peep Ernits <[EMAIL PROTECTED]> writes:
>  (select id, mystuff from arraytest where id=1) union (select id, mystuf
> f from arraytest where id=2);

> ERROR:  Unable to identify an ordering operator '<' for type '_varchar'
>         Use an explicit ordering operator or modify the query

> Is it necessary to require the explicit ordering operator in this
> case?

Yes, because UNION implies duplicate removal, which requires sorting.
If you don't actually need duplicate removal, use UNION ALL.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

Reply via email to