diff options
-rw-r--r-- | src/test/regress/expected/tidscan.out | 54 | ||||
-rw-r--r-- | src/test/regress/sql/tidscan.sql | 4 |
2 files changed, 17 insertions, 41 deletions
diff --git a/src/test/regress/expected/tidscan.out b/src/test/regress/expected/tidscan.out index bd1fae084a..3355409f8a 100644 --- a/src/test/regress/expected/tidscan.out +++ b/src/test/regress/expected/tidscan.out @@ -118,18 +118,13 @@ FETCH ALL FROM c; (0,1) | 3 (3 rows) +-- XL does not support BACKWARD scan of RemoteSubplan/RemoteSubquery and +-- hence the next statement fails FETCH BACKWARD 1 FROM c; - ctid | id --------+---- - (0,2) | 2 -(1 row) - +ERROR: cursor can only scan forward +HINT: Declare it with SCROLL option to enable backward scan. FETCH FIRST FROM c; - ctid | id --------+---- - (0,1) | 1 -(1 row) - +ERROR: current transaction is aborted, commands ignored until end of transaction block ROLLBACK; -- tidscan via CURRENT OF BEGIN; @@ -148,47 +143,24 @@ FETCH NEXT FROM c; -- perform update EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +-- XL does not support WHERE CURRENT OF and hence the next +-- statement fails UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *; - QUERY PLAN ---------------------------------------------------- - Update on tidscan (actual rows=1 loops=1) - -> Tid Scan on tidscan (actual rows=1 loops=1) - TID Cond: CURRENT OF c -(3 rows) - +ERROR: WHERE CURRENT OF clause not yet supported FETCH NEXT FROM c; - ctid | id --------+---- - (0,3) | 3 -(1 row) - +ERROR: current transaction is aborted, commands ignored until end of transaction block -- perform update EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *; - QUERY PLAN ---------------------------------------------------- - Update on tidscan (actual rows=1 loops=1) - -> Tid Scan on tidscan (actual rows=1 loops=1) - TID Cond: CURRENT OF c -(3 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block SELECT * FROM tidscan; - id ----- - 1 - -2 - -3 -(3 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block -- position cursor past any rows FETCH NEXT FROM c; - ctid | id -------+---- -(0 rows) - +ERROR: current transaction is aborted, commands ignored until end of transaction block -- should error out EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *; -ERROR: cursor "c" is not positioned on a row +ERROR: current transaction is aborted, commands ignored until end of transaction block ROLLBACK; DROP TABLE tidscan; diff --git a/src/test/regress/sql/tidscan.sql b/src/test/regress/sql/tidscan.sql index c9d632e49d..16acf2819e 100644 --- a/src/test/regress/sql/tidscan.sql +++ b/src/test/regress/sql/tidscan.sql @@ -41,6 +41,8 @@ BEGIN; DECLARE c CURSOR FOR SELECT ctid, * FROM tidscan WHERE ctid = ANY(ARRAY['(0,1)', '(0,2)']::tid[]); FETCH ALL FROM c; +-- XL does not support BACKWARD scan of RemoteSubplan/RemoteSubquery and +-- hence the next statement fails FETCH BACKWARD 1 FROM c; FETCH FIRST FROM c; ROLLBACK; @@ -52,6 +54,8 @@ FETCH NEXT FROM c; -- skip one row FETCH NEXT FROM c; -- perform update EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) +-- XL does not support WHERE CURRENT OF and hence the next +-- statement fails UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *; FETCH NEXT FROM c; -- perform update |