Re: union query returning duplicates

Поиск
Список
Период
Сортировка
От Alvaro Herrera Munoz
Тема Re: union query returning duplicates
Дата
Msg-id 20041020125226.GA28375@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: union query returning duplicates  (Sim Zacks <sim@compulab.co.il>)
Список pgsql-general
On Wed, Oct 20, 2004 at 01:54:04PM +0200, Sim Zacks wrote:
> It is very weird, I just tried both a group by and distinct and both
> of them still return the duplicates.
>
> I also tried a very simple union which didn't return any duplicates,
> both of these said, it is obviously not a problem with union.

Not related to your underlying problem, but be aware that UNION does
eliminate duplicates by design, so that could explain what you are seeing
here.  If you don't want it to do that, use UNION ALL instead (the same
applies to INTERSECT and EXCEPT if you ever happen to use them).

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Saca el libro que tu religión considere como el indicado para encontrar la
oración que traiga paz a tu alma. Luego rebootea el computador
y ve si funciona" (Carlos Duclós)

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

Предыдущее
От: Sim Zacks
Дата:
Сообщение: Re: union query returning duplicates
Следующее
От: Josh Close
Дата:
Сообщение: Re: how much ram do i give postgres?