On Thu, Sep 9, 2010 at 6:34 PM, Nick wrote:
> On Sep 9, 2:21 am, dmit...@gmail.com (Dmitriy Igrishin) wrote:
>> Hey Nick,
>>
>> You may do it with PL/pgSQL more easily with hstore module.
>> Please, refer tohttp://www.postgresql.org/docs/9.0/static/hstore.html
>> Please, look at the hstore(record)
On Sep 9, 2:21 am, dmit...@gmail.com (Dmitriy Igrishin) wrote:
> Hey Nick,
>
> You may do it with PL/pgSQL more easily with hstore module.
> Please, refer tohttp://www.postgresql.org/docs/9.0/static/hstore.html
> Please, look at the hstore(record) and populate_record(record, hstore)
> function. Hop
Hey Nick,
You may do it with PL/pgSQL more easily with hstore module.
Please, refer to http://www.postgresql.org/docs/9.0/static/hstore.html
Please, look at the hstore(record) and populate_record(record, hstore)
function. Hope this helps.
And I think it will be more faster then you solution.
Reg
Hello
plpgsql isn't good tool for this. use a plperl or plpython instead.
your solution is extremly slow.
Regards
Pavel Stehule
2010/9/9 Nick :
> I need to dynamically update NEW columns. Ive been inserting the NEW
> values into a temp table, updating them, then passing the temp table
> values
I need to dynamically update NEW columns. Ive been inserting the NEW
values into a temp table, updating them, then passing the temp table
values back to NEW (is there a better way?). Ive had success with this
method unless there is a null value...
EXECUTE 'CREATE TEMP TABLE new AS SELECT $1.*' USI