"Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
> All explicit cursors (what I know) use named SQL cursors. SQL name is
> checked in OPEN statement. Refcursors are problematic. But refcursors
> are not updatable.
Sure they are, and besides which a bound cursor can still have a name
different from the SQL name --- you just assign something to it before
opening it. So this patch just plain doesn't work.
As the code stands plpgsql will try to issue something like
UPDATE/DELETE ... WHERE CURRENT OF $1
Since we don't try to do anything with the cursor name until runtime,
it seems that this would work if we allowed a parameter symbol there.
Offhand that doesn't look hard.
regards, tom lane