Which cursor-related warnings should be errors?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Which cursor-related warnings should be errors?
Date: 2003-07-30 09:06:39
Message-ID: Pine.LNX.4.56.0307301050540.1171@krusty.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

The developers are currently discussing changing several cursor-related
warnings to hard errors. If PostgreSQL were to be designed from scratch,
there would hardly be discussion about this, but now we are wondering
whether any existing users would seriously be affected by this change.
The cases under consideration are:

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(at)gmx(dot)net

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Patrick Welche 2003-07-30 13:50:11 Re: Upgrading my BSDI box, again
Previous Message Peter Eisentraut 2003-07-30 07:54:20 Re: [HACKERS] Passing server_encoding to the client is not future-proof

Browse pgsql-sql by date

  From Date Subject
Next Message Christoph Haller 2003-07-30 09:08:58 Re: time precision.
Previous Message oheinz 2003-07-30 08:52:47 Re: Problem using Subselect results