[HACKERS] Warning for undefined cursor

2003-07-28 Thread Peter Eisentraut
In backend/commands/portalcmds.c we have

/* FIXME: shouldn't this be an ERROR? */
ereport(WARNING,
(errcode(ERRCODE_UNDEFINED_CURSOR),
 errmsg(portal \%s\ does not exist, stmt-portalname)));

The effect of this is that you can fetch from an undefined cursor and
(successfully) get zero rows plus this warning.  I propose that we change
this to an error.  Does anyone see a reason against this, except possibly
bugward compatibility?

-- 
Peter Eisentraut   [EMAIL PROTECTED]

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] Warning for undefined cursor

2003-07-28 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes:
 In backend/commands/portalcmds.c we have
 /* FIXME: shouldn't this be an ERROR? */

 The effect of this is that you can fetch from an undefined cursor and
 (successfully) get zero rows plus this warning.  I propose that we change
 this to an error.  Does anyone see a reason against this, except possibly
 bugward compatibility?

Backwards compatibility is the reason why it isn't an error now.

-hackers is not really the right forum to find out whether anyone is
depending on that behavior.  I'd suggest you shop the proposal around
on -general or -sql and see if you get any complaints.  (I think there
are a couple other cursor-related warnings that really oughta be errors,
too; might as well finger them all while you are at it.)

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster