Re: Substitute a variable in PL/PGSQL.

From: Steve Martin <steve(dot)martin(at)nec(dot)co(dot)nz>
To: artacus(at)comcast(dot)net
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Substitute a variable in PL/PGSQL.
Date: 2008-07-27 23:18:33
Message-ID: 488D0249.8030308@nec.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

artacus(at)comcast(dot)net wrote:

>You can do it in straight sql like so.
>
>SELECT (array[col1, col2, col3, col4, col5, col6, col7, col8, col9, col10])[i]
>FROM test t, generate_series(1,10) i
>
>Art
>
>
>
Hi Art,
Thanks for the advice, in my case using arrays was not a option as the
data could be null.
Steve M.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sushant Sinha 2008-07-28 02:06:50 Re: Profiling postgres
Previous Message Steve Martin 2008-07-27 23:15:31 Re: Substitute a variable in PL/PGSQL.