I have a PL/pgSQL function which requires one input parameter which is the primary key of the table on which it works. I call it as follows:
select myFunction('0001');
It then does some calculations on the data in the row identified by '0001' of a particular table and performs an UPDATE.
How can I call the function repeatedly for each primary key returned by a query? Something like the following:
select myFunction(select ID from theTable);
Maybe you should call the function as follow:
idbeing the pk of the table.