Re: dynamically referencing a column name in a function - Mailing list pgsql-sql

From Adrian Klaver
Subject Re: dynamically referencing a column name in a function
Date
Msg-id 52FFF863.5060508@gmail.com
Whole thread Raw
In response to Re: dynamically referencing a column name in a function  (James Sharrett <jsharrett@tidemark.com>)
List pgsql-sql
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



pgsql-sql by date:

Previous
From: James Sharrett
Date:
Subject: Re: dynamically referencing a column name in a function
Next
From: amul sul
Date:
Subject: Trigger SQL script execution after DROP EXTENSION