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 peter_e@gmx.net