Re: UNION and array types

From: Eric B(dot)Ridge <ebr(at)tcdi(dot)com>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: UNION and array types
Date: 2002-11-22 23:22:43
Message-ID: 4D59B051-FE71-11D6-AC2D-0003937E3354@tcdi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

On Friday, November 22, 2002, at 04:50 PM, Bruno Wolff III wrote:
> On Fri, Nov 22, 2002 at 16:29:07 -0500,
> "Eric B. Ridge" <ebr(at)tcdi(dot)com> wrote:
>> UNIONs don't appear to work when you are trying to union 2 tables that
>> include array types.
>>
>> Is it possible to make this work? Please tell me yes. :)
>
> I think you can get by with union all if you don't care if duplicates
> stay.

Thanks! This works like a charm. And the duplicates get filtered out
from an outer SELECT DISTINCT ON (id) query, so this is perfect.

I suppose it's faster too since UNION ALL doesn't try to sort?

eric

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Frank Bax 2002-11-22 23:23:56 Re: index vs seqscan question
Previous Message Tom Lane 2002-11-22 22:30:41 Re: index vs seqscan question

Browse pgsql-novice by date

  From Date Subject
Next Message Scott Lamb 2002-11-22 23:39:06 Re: UNION and array types
Previous Message Joshua Daniel Franklin 2002-11-22 22:43:12 Getting started links