Re: Union with array types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Union with array types
Дата
Msg-id 25327.984585289@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Union with array types  (Juhan-Peep Ernits <juhan@cc.ioc.ee>)
Список pgsql-general
Juhan-Peep Ernits <juhan@cc.ioc.ee> 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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Brent R. Matzelle"
Дата:
Сообщение: Re: Maximum size of one table
Следующее
От: jdassen@cistron.nl (J.H.M. Dassen (Ray))
Дата:
Сообщение: Re: Binary Large Data on Postgres