Re: Need help to dynamically access to colomns in function! - Mailing list pgsql-general

From Ivan Pavlov
Subject Re: Need help to dynamically access to colomns in function!
Date
Msg-id 795385b5-b7e0-4ec2-b0ae-5af31d89dd33@e6g2000vbe.googlegroups.com
Whole thread Raw
In response to Need help to dynamically access to colomns in function!  ("Иван Марков" <aesthete2005@gmail.com>)
List 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


pgsql-general by date:

Previous
From: "Gauthier, Dave"
Date:
Subject: Re: Isolating a record column from a PL-Pgsql function call ?
Next
From: TJ O'Donnell
Date:
Subject: Re: Lost password