Farooq wrote:
> With two separate calls; the second statement complains that the cursor does not exist.
You'd have to wrap them in a transaction (explicit BEGIN / COMMIT).
In any case, you've since received a better suggestion than mine.
--
Craig Ringer