[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-sql
Subject:    Re: [SQL] dynamically referencing a column name in a function
From:       Adrian Klaver <adrian.klaver () gmail ! com>
Date:       2014-02-15 23:29:39
Message-ID: 52FFF863.5060508 () gmail ! com
[Download RAW message or body]

On 02/15/2014 02:41 PM, James Sharrett wrote:
> Thanks Adrian.  The problem is that the data query will return many
> columns all of which I need in later operations.  For this specific block
> in the process, I need to take a pair of columns, based on user inputs,
> and run their values them thru the operations performed in the sub
> function to perform some operations and return the results and I need the
> values I pass into the parameter to be in sync with the recordset which
> will have many records with the same values for the column pairs so
> keeping the whole record being operated on in line with the values passed
> to the sub-function becomes the difficult part.  Iım trying to avoid using
> a cursor but even with that I think I may run into similar issues.
>

Well I did say it probably would not scale:) Without a concrete example 
of the actual process it would be hard to offer any specific advice.


-- 
Adrian Klaver
adrian.klaver@gmail.com


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic