BUG #1469: ECPG : Can't delete an item pointed by a cursor

Поиск
Список
Период
Сортировка
Искать

BUG #1469: ECPG : Can't delete an item pointed by a cursor

От:
"Anthony COMMUNIER" <anthony.communier@capgemini.fr>
Дата:
The following bug has been logged online:

Bug reference:      1469
Logged by:          Anthony COMMUNIER
Email address:      anthony.communier@capgemini.fr
PostgreSQL version: 8.0.1
Operating system:   Aix 5.2,UnixWare 7.1.3,Win32
Description:        ECPG : Can't delete an item pointed by a cursor
Details: 

The statement : EXEC SQL DELETE  FROM  WHERE CURRENT OF 
(describe in SQL 99) isn't recognize by ecpg

Ecpg returns ERROR: syntax error at or near "CURRENT" for the following
program :


EXEC SQL DECLARE C3_NTF CURSOR FOR
	SELECT
		NUM_NOTIF, 
		TYPE_NOTIF, 
		NOTIFIE, 
		ACTION, 
		NB_NVX_MSG
	FROM 
		DISPNTEL
	FOR UPDATE;
	
	EXEC  OPEN C3_NTF;

...

	for(;;)
	{
...		

          EXEC SQL FETCH C3_NTF
		INTO :SAPnum_notif,
		     :SAPtype_notif,
		     :SAPnotifie:INDnotifie,
		     :SAPaction:INDaction,
		     :SAPnb_nvx_msg:INDnb_nvx_msg;
		
...		
	  EXEC SQL DELETE  FROM DISPNTEL WHERE CURRENT OF C3_NTF;

...

    }			


The yacc grammar do not authorize the keywords CURRENT OF

Re: BUG #1469: ECPG : Can't delete an item pointed by a cursor

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Anthony COMMUNIER wrote:
> The statement : EXEC SQL DELETE  FROM  WHERE CURRENT OF
>  (describe in SQL 99) isn't recognize by ecpg

PostgreSQL does not implement the entire SQL standard by any means.  
Please refer to the documentation about what you can expect to work and 
how.

Re: BUG #1469: ECPG : Can't delete an item pointed by a cursor

От:
Michael Meskes <meskes@postgresql.org>
Дата:
On Mon, Feb 07, 2005 at 11:48:48PM +0000, Anthony COMMUNIER wrote:
> The statement : EXEC SQL DELETE  FROM  WHERE CURRENT OF 
> (describe in SQL 99) isn't recognize by ecpg

This holds for the backend as well, doesn't it?

The feature is not implemented and thus it makes no sense to allow it in
ecpg. But there are some patches that implement
the feature on gborg afaik.

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
FAQ