Atif Jung <atifjung(at)gmail(dot)com> writes:
> I'm getting an error msg which reads:
> DECLARE CURSOR can only be used in transaction blocks.
> does that mean to DECLARE a cursor I must surrond it with a BEGIN & COMMIT
> work?
Yes. The cursor automatically disappears as soon as you commit, so it'd
be useless otherwise.
regards, tom lane