Re: Pgsql problem

From: Achilleas Mantzios <achill(at)smadev(dot)internal(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Pgsql problem
Date: 2012-01-12 11:43:21
Message-ID: 201201121343.21473.achill@smadev.internal.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Πεμ 12 Ιαν 2012 12:51:00 pasman pasmański wrote:
> Hi.
>
> I write function in pgsql. This function needs
> to execute other functions by name.
> I do it using loop:
>
> declare r record;
> begin
> for r in execute 'select ' || $1 || '()'
> loop
> end loop;
>
> But I can't convert a record to array of text.
> How to do it ?
>

Maybe you should a look at array_agg. It is an aggregate function operating on
a set of values and returning the resulting array.

http://www.postgresql.org/docs/9.0/interactive/functions-aggregate.html

>
> ------------
> pasman

--
Achilleas Mantzios
IT DEPT

In response to

Browse pgsql-general by date

  From Date Subject
Next Message eshishki 2012-01-12 13:08:56 Corrupted index, what do i do?
Previous Message Dmitriy Igrishin 2012-01-12 10:59:10 Re: Pgsql problem