Zahid Khan <khanzahid235@yahoo.com> writes:
>> I might be missing something here, but where do you see the bug? The cursor is
>> indeed already defined.
> What i understand here is,we should be able to DECLARE cursor again
> with the same name if that is CLOSE already.
No, CLOSE reverses the effect of OPEN, not of DECLARE.
regards, tom lane