Re: [HACKERS] Updatable cursor doubt

2007-09-04 Thread Heikki Linnakangas
FAST PostgreSQL wrote: In CVS HEAD workspace=# begin; BEGIN workspace=# declare cu cursor for select * from t1 for read only; DECLARE CURSOR workspace=# fetch cu; a --- 1 (1 row) workspace=# delete from t1 where current of cu; DELETE 1 workspace=# commit; COMMIT Is this the

Re: [HACKERS] Updatable cursor doubt

2007-09-04 Thread Kevin Grittner
On Tue, Sep 4, 2007 at 4:16 AM, in message [EMAIL PROTECTED], Heikki Linnakangas [EMAIL PROTECTED] wrote: FOR READ ONLY is actually part of the SELECT syntax. 13.1 declare cursor Function Define a cursor. Format declare cursor ::=

Re: [HACKERS] Updatable cursor doubt

2007-09-04 Thread Josh Berkus
Heikki, FOR READ ONLY is actually part of the SELECT syntax. It's been accepted for at least down to version 7.4, probably even longer than that, but it hasn't been documented. It's accepted for the sake of compatibility with other DBMSs (and SQL standard?), it doesn't do anything in

Re: [HACKERS] Updatable cursor doubt

2007-09-04 Thread Gregory Stark
Josh Berkus [EMAIL PROTECTED] writes: Who are we, MySQL? We ought not to accept the syntax if we're not going to enforce it. I think the thinking is that the syntax doesn't promise anything about enforcing any restrictions. It's a method for the user to declare what features he needs. Ie,

[HACKERS] Updatable cursor doubt

2007-09-03 Thread FAST PostgreSQL
In CVS HEAD workspace=# begin; BEGIN workspace=# declare cu cursor for select * from t1 for read only; DECLARE CURSOR workspace=# fetch cu; a --- 1 (1 row) workspace=# delete from t1 where current of cu; DELETE 1 workspace=# commit; COMMIT Is this the intended behaviour? If so should we