Array iterator

From: Raj Mathur <raju(at)linux-delhi(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Array iterator
Date: 2009-01-27 12:40:29
Message-ID: 200901271810.29691.raju@linux-delhi.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

Is there any way to apply a built-in function to all elements of an
array (and get an array as result) without using a procedural language?

Specifically, I'm looking at being able to take a string, tokenise it
into an array and apply soundex to each of the tokens (not particularly
efficient or effective, but serves this specific purpose). Have got as
far as:

select regexp_split_to_array('string with tokens', '[^A-Za-z0-9]');

Can one now process the resulting array in a single shot within SQL
itself?

Regards,

-- Raju
--
Raj Mathur raju(at)kandalaya(dot)org http://kandalaya.org/
GPG: 78D4 FC67 367F 40E2 0DD5 0FEF C968 D0EF CC68 D17F
PsyTrance & Chill: http://schizoid.in/ || It is the mind that moves

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Achilleas Mantzios 2009-01-27 13:34:20 Re: Array iterator
Previous Message Marc Mamin 2009-01-26 16:04:38 Re: aggregation problem: first/last/count(*)