plpgsql setof help

From: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: plpgsql setof help
Date: 2009-01-28 23:37:06
Message-ID: 4980EC22.2080306@zeut.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello, I'm trying to write a pl/pgsql function that takes in a column
(setof?) of text values and returns an english language list, for example:

if "select towns from towns_table;" retuned
town1
town2
town3

I want the following:
select column_to_english_list( select towns from towns_table );

to return:
'town1, town2 and town3'

In order to do this, I think I would have to create a pl/pgsql function
that accpts a setof text argument, but I'm not sure that's allowed.
Anyone care to comment?

Thank you,

Matthew O'Connor

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2009-01-29 00:29:41 Re: plpgsql setof help
Previous Message Achilleas Mantzios 2009-01-27 13:34:20 Re: Array iterator