Since no one responded to the message below (posted on pgsql-sql), I made
the change from warning to error in the indicated cases.
> Fetching from a non-existent cursor:
>
> peter=# FETCH ALL FROM non_existent;
> WARNING: portal "non_existent" does not exist
> FETCH 0
>
> Closing a non-existent cursor:
>
> peter=# CLOSE non_existent;
> WARNING: portal "non_existent" does not exist
> CLOSE CURSOR
>
> Declaring a new cursor that uses a name already in use:
>
> peter=# BEGIN;
> BEGIN
> peter=# DECLARE foo CURSOR FOR SELECT 1;
> DECLARE CURSOR
> peter=# DECLARE foo CURSOR FOR SELECT 2;
> WARNING: Closing pre-existing portal "foo"
> DECLARE CURSOR
>
> So if anyone can come up with a reason that theses WARNING: messages
> should not be changed to errors, please speak up.
--
Peter Eisentraut peter_e@gmx.net