pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-sql@postgresql.org
Subject: Which cursor-related warnings should be errors?
Date: Wed, 30 Jul 2003 11:06:39 +0200 (CEST)
Message-ID: <Pine.LNX.4.56.0307301050540.1171@krusty.credativ.de> (raw)

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



view thread (2+ messages)  latest in thread

Message-ID: <Pine.LNX.4.56.0307301050540.1171@krusty.credativ.de>
Permalink:  ../Pine.LNX.4.56.0307301050540.1171@krusty.credativ.de/
Also on:    postgresql.org/message-id/Pine.LNX.4.56.0307301050540.1171@krusty.credativ.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: peter_e@gmx.net
  Subject: Re: Which cursor-related warnings should be errors?
  In-Reply-To: <Pine.LNX.4.56.0307301050540.1171@krusty.credativ.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox