I found the following behavior surprising. Is there a reason for it?
This is 8.3.5. ...Robert
rhaas=# BEGIN WORK;
BEGIN
rhaas=# CREATE TABLE test_table (id serial, foo integer, bar integer);
NOTICE: CREATE TABLE will create implicit sequence
"test_table_id_seq" for serial column "test_table.id"
CREATE TABLE
rhaas=# INSERT INTO test_table VALUES (DEFAULT, 1, 1);
INSERT 0 1
rhaas=# DECLARE c CURSOR FOR SELECT id FROM test_table ORDER BY foo FOR UPDATE;
DECLARE CURSOR
rhaas=# FETCH c;
id
----
1
(1 row)
rhaas=# UPDATE test_table SET bar = NULL WHERE CURRENT OF c;
ERROR: cursor "c" is not a simply updatable scan of table "test_table"
rhaas=# \q