pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Felix E. Klee <felix.klee@inka.de>
To: PFC <lists@boutiquenumerique.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Turning column into *sorted* array?
Date: Wed, 18 May 2005 20:17:49 +0200
Message-ID: <87y8ac8kky.wl%felix.klee@inka.de> (raw)
In-Reply-To: <op.sqzf0iuuth1vuj@localhost>
References: <87zmus8qdm.wl%felix.klee@inka.de>
	<op.sqzf0iuuth1vuj@localhost>

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



view thread (3+ messages)

Message-ID: <87y8ac8kky.wl%felix.klee@inka.de>
Permalink:  ../87y8ac8kky.wl%25felix.klee@inka.de/
Also on:    postgresql.org/message-id/87y8ac8kky.wl%felix.klee@inka.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: felix.klee@inka.de, lists@boutiquenumerique.com
  Subject: Re: Turning column into *sorted* array?
  In-Reply-To: <87y8ac8kky.wl%felix.klee@inka.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox