"ORDER BY" clause prevents "UPDATE WHERE CURRENT OF"
| От | Robert Haas |
|---|---|
| Тема | "ORDER BY" clause prevents "UPDATE WHERE CURRENT OF" |
| Дата | |
| Msg-id | 603c8f070811141332l3b8ebbc0vaf70219a27cc795@mail.gmail.com обсуждение исходный текст |
| Ответы |
Re: "ORDER BY" clause prevents "UPDATE WHERE CURRENT OF"
Re: "ORDER BY" clause prevents "UPDATE WHERE CURRENT OF" |
| Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: