Re: Turning column into *sorted* array?

From: "Felix E(dot) Klee" <felix(dot)klee(at)inka(dot)de>
To: PFC <lists(at)boutiquenumerique(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Turning column into *sorted* array?
Date: 2005-05-18 18:17:49
Message-ID: 87y8ac8kky.wl%felix.klee@inka.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

At Wed, 18 May 2005 19:54:08 +0200,
PFC wrote:
> > SELECT array_accum(x) FROM (SELECT * FROM some_view ORDER BY x) AS tmp;
>
> If you're using integers, you could use the int_array_accum or
> something from the intarray module which is a lot faster. I believe
> intarray also has a function for sorting integer arrays...

No, unfortunately I'm using strings in "real-life" (my example is
perhaps a bit over-simplified).

Let me make my original question a bit more precise: How do I best
transform a column of varchars into a *sorted* array?

--
Felix E. Klee

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Chris Browne 2005-05-18 19:52:33 Re: Does Postgresql have a similar pseudo-column "ROWNUM" as
Previous Message PFC 2005-05-18 17:54:08 Re: Turning column into *sorted* array?