> That's a good point. We throw error for DECLARE CURSOR outside a
> transaction block, since it's obviously a mistake. I wonder whether
> we shouldn't equally throw error for LOCK outside a transaction block.
>
> I can sort of imagine some corner cases where
> lock-and-immediately-release would be the intended behavior, but that
> sure seems a whole lot less probable than it being user error.
> And you could always throw BEGIN/COMMIT into the command if that
> really was what you wanted.
>
> Objections anyone?
No, I've been bitten by this myself.
...Robert