array_cat without duplicity

From: Ondřej Fafejta <ondrej(dot)fafejta(at)kyberie(dot)cz>
To: pgsql-general(at)postgresql(dot)org
Subject: array_cat without duplicity
Date: 2008-03-19 14:05:06
Message-ID: 47E11D92.8070000@kyberie.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

Postgresql: version 8.1.11

Is there a way to concatenate two arrays without duplicity?

This select return duplicity:

SELECT array_cat(ARRAY[1,2], ARRAY[2,3]);
array_cat
-----------
{1,2,2,3}

I need to get result without duplicity!
{1,2,3}

Thx
Fafi

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Erik Jones 2008-03-19 14:12:50 Re: Conditional JOINs ?
Previous Message Leon Mergen 2008-03-19 14:01:08 Re: Conditional JOINs ?