Re: Arrays - selecting (and not removing) duplicates... - Mailing list pgsql-general

From Pól Ua Laoínecháin
Subject Re: Arrays - selecting (and not removing) duplicates...
Date
Msg-id CAF4RT5T-1UipFOv2MQ_hP=2mzFEcTa=2xrWD4LrjrQCi99GLuw@mail.gmail.com
Whole thread Raw
In response to Re: Arrays - selecting (and not removing) duplicates...  (Pól Ua Laoínecháin <linehanp@tcd.ie>)
List pgsql-general
Hi all and apologies for the simple question!

> I want to "feed" the result of a query into your function - is there
> something special I have to do for this?

SELECT
  ARRAY_DUPS
  (
    (
      SELECT ARRAY[1,3,4,1, 5,6,5, 67]
    )
  ) AS t;

answer:

t
{1,5}


And I can also feed in queries. A second set of braces (round
brackets) is needed!

Thanks again and rgs,


Pól...

> Pól...



pgsql-general by date:

Previous
From: Joe Conway
Date:
Subject: Re: Pg stuck at 100% cpu, for multiple days
Next
From: hubert depesz lubaczewski
Date:
Subject: Pg stuck at 100% cpu, for multiple days