pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedWhich cursor-related warnings should be errors?
2+ messages / 1 participants
[nested] [flat]
* Which cursor-related warnings should be errors?
@ 2003-07-30 09:06 Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 2+ messages in thread
From: Peter Eisentraut @ 2003-07-30 09:06 UTC (permalink / raw)
To: 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@gmx.net
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Which cursor-related warnings should be errors?
@ 2003-08-24 21:10 Peter Eisentraut <peter_e@gmx.net>
parent: Peter Eisentraut <peter_e@gmx.net>
0 siblings, 0 replies; 2+ messages in thread
From: Peter Eisentraut @ 2003-08-24 21:10 UTC (permalink / raw)
To: PostgreSQL Development <pgsql-hackers@postgresql.org>
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-08-24 21:10 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-07-30 09:06 Which cursor-related warnings should be errors? Peter Eisentraut <peter_e@gmx.net>
2003-08-24 21:10 ` Peter Eisentraut <peter_e@gmx.net>
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