On Fri, 2003-03-21 at 12:12, Tom Lane wrote:
> I agree that the second of these is bogus. I'm ambivalent about
> changing the first; it's odd but perhaps there are apps out there
> that depend on it. Any other opinions out there?
For what it's worth, I noticed that the first (DECLARE CURSOR replacing
existing cursors with the same name) doesn't seem to be allowed by the
SQL spec:
(Section 14.1, Syntax Rules)
1. If a <declare cursor> is contained in an SQL-client module M, then:
(a) The <cursor name> shall not be equivalent to the <cursor name> of any other <declare cursor> in M.
Personally, I'm inclined to change both of these cases to result in an
error...
Cheers,
Neil