Re: looping over a small record set over and over in a function

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: looping over a small record set over and over in a function
Date: 2009-06-21 02:57:51
Message-ID: 1245553071.15432.30.camel@ayaki
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2009-06-19 at 20:23 +0200, Ivan Sergio Borgonovo wrote:

> If I could easily load all the dataset into an array, loop through
> it and then just update the computed field it would be nice... but
> how?

Are you sure you _really_ need a PL/PgSQL function for this?

Can't you:

SELECT x.*, computefield(x, p)
FROM smalltable x, otherparams p;

or something along those lines?

--
Craig Ringer

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Assaf Lavie 2009-06-21 05:02:13 Build in spatial support vs. PostGIS
Previous Message Gerhard Wiesinger 2009-06-20 20:28:34 Implicit conversion/comparision of timestamp with and without timezone