Variable column name

From: "Bob Pawley" <rjpawley(at)shaw(dot)ca>
To: "Postgresql" <pgsql-general(at)postgresql(dot)org>
Subject: Variable column name
Date: 2011-09-01 14:51:18
Message-ID: A35B74CF2573453D89E0AB36E4A56721@BobPC
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

I want to add information to multiple columns (20 – 40) by employing a loop. Each pass of the loop will populate one column with an array.

I have tried and I have read that variables can not be used to control column names.

Is there a means of working around this restriction other than creating 20 to 40 hard coded statements??

Bob

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2011-09-01 14:59:35 Re: Variable column name
Previous Message Tom Lane 2011-09-01 14:46:40 Re: Memory leak somewhere at PQconnectdb?