Re: Which cursor-related warnings should be errors?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Which cursor-related warnings should be errors?
Date: 2003-08-24 21:10:24
Message-ID: Pine.LNX.4.44.0308242308030.6464-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2003-08-24 21:14:37 Re: ambiguous sql states
Previous Message Jason Tishler 2003-08-24 20:55:42 Re: PostgreSQL 7.4 Beta 1 + SSL + Cygwin

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-08-24 21:37:14 Re: [SQL] "SELECT IN" Still Broken in 7.4b
Previous Message Peter Eisentraut 2003-08-24 08:43:57 Re: Equality operators on NULL values