Re: Arrays - selecting (and not removing) duplicates...

From: Pól Ua Laoínecháin <linehanp(at)tcd(dot)ie>
To:
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Arrays - selecting (and not removing) duplicates...
Date: 2021-08-30 15:11:51
Message-ID: CAF4RT5T-1UipFOv2MQ_hP=2mzFEcTa=2xrWD4LrjrQCi99GLuw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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...

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2021-08-30 15:15:27 Pg stuck at 100% cpu, for multiple days
Previous Message Ian Dauncey 2021-08-30 15:08:56 RE: vacuumlo