"Simon Riggs" <[EMAIL PROTECTED]> writes: > On Tue, 2007-01-23 at 09:55 -0500, Tom Lane wrote: >> This really isn't gonna work, because it assumes that the tuple that is >> "current" at the instant of parsing is still going to be "current" at >> execution time.
> Of course thats true, but you've misread my comment. > The portal with the cursor in will not change, no matter how many times > we execute WHERE CURRENT OF in another portal. Really? The cursor portal will cease to exist as soon as the transaction ends, but the prepared plan won't. A reasonable person would expect that WHERE CURRENT OF will parse into a plan that just stores the cursor name, and looks up the cursor at execution time. > The OP suggested putting > the current tuple pointer onto the portal data, so this will work. No, as I read his message he was suggesting pulling data out of the cursor portal at plan time so that no downstream (executor) changes would be needed. That is certainly never going to be workable. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend