Re: Need help to dynamically access to colomns in function!

From: Ivan Pavlov <ivan(dot)pavlov(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Need help to dynamically access to colomns in function!
Date: 2008-12-16 21:04:53
Message-ID: 795385b5-b7e0-4ec2-b0ae-5af31d89dd33@e6g2000vbe.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Please disregard my other message. I didn't get what you are trying to
do at first.
You can do this with dynamic SQL: Look at 38.5.4. Executing Dynamic
Commands (http://www.postgresql.org/docs/current/static/plpgsql-
statements.html).
I guess something like

EXECUTE 'SELECT tmprec.group' || i INTO value

will work in a loop. Didn't try it though.

regards,
Ivan Pavlov

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hoover, Jeffrey 2008-12-16 21:48:27 Re: Need help to dynamically access to colomns in function!
Previous Message Ivan Pavlov 2008-12-16 20:55:03 Re: Need help to dynamically access to colomns in function!